Loose numpy version (#30)

* disable using pip extra requirement installation

* loose numpy

* waymo

* waymo version

* add numpy hint

* restore

* Add to note

* add hint
This commit is contained in:
Quanyi Li
2023-10-04 16:46:39 +01:00
committed by GitHub
parent d14524b26f
commit 5fa5c1070f
7 changed files with 27 additions and 51 deletions

View File

@@ -13,13 +13,13 @@ For any dataset, this step is necessary after installing ScenarioNet,
as we need to use the official toolkits of the data provider to parse the original scenario description and convert to our internal scenario description.
For Waymo data, please install the toolkit via::
pip install waymo-open-dataset-tf-2-11-0==1.5.0
# Or install with scenarionet
pip install -e .[waymo]
pip install waymo-open-dataset-tf-2-11-0
pip install tensorflow==2.11.0
.. note::
This package is only supported on Linux platform.
`waymo-open-dataset` may degrade numpy, causing conflicts with cv2.
A workaround is ``pip install numpy==1.24.2``
For other datasets like nuPlan and nuScenes, you need to setup `nuplan-devkit <https://github.com/motional/nuplan-devkit>`_ and `nuscenes-devkit <https://github.com/nutonomy/nuscenes-devkit>`_ respectively.
Guidance on how to setup these datasets and connect them with ScenarioNet can be found at :ref:`datasets`.

View File

@@ -67,26 +67,8 @@ For ScenarioNet, we only provide Github installation::
git clone git@github.com:metadriverse/scenarionet.git
cd scenarionet
Anyone of the following commands will automatically install basic requirements with additional requirements
for specific datasets::
# Install basic requirement only
pip install -e .
# Install Waymo official toolkit
pip install -e .[waymo]
# Install nuScenes development tookit
pip install -e .[nuscenes]
# Install nuPlan development tookit
pip install -e .[nuplan]
# Install all toolkit for all datasets
pip install -e .[all]
.. note::
If you don't wanna access the source code, you can install these two packages with
``pip install git+https://github.com/metadriverse/scenarionet.git``

View File

@@ -30,9 +30,6 @@ First of all, we have to install the ``nuplan-devkit``.
# 2. or install from PyPI
pip install nuplan-devkit
# 3. or install with scenarionet
pip install -e .[nuplan]
By installing from github, you can access examples and source code the toolkit.
The examples are useful to verify whether the installation and dataset setup is correct or not.

View File

@@ -34,9 +34,6 @@ First of all, we have to install the ``nuscenes-devkit``.
# or install from PyPI
pip install nuscenes-devkit
# or install with scenarionet
pip install -e .[nuscenes]
By installing from github, you can access examples and source code the toolkit.
The examples are useful to verify whether the installation and dataset setup is correct or not.

View File

@@ -34,11 +34,10 @@ First of all, we have to install the waymo toolkit and tensorflow::
pip install waymo-open-dataset-tf-2-11-0
pip install tensorflow==2.11.0
# Or install with scenarionet
pip install -e .[waymo]
.. note::
This package is only supported on Linux platform.
`waymo-open-dataset` may degrade numpy, causing conflicts with cv2.
A workaround is ``pip install numpy==1.24.2``
2. Download TFRecord
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -21,7 +21,7 @@ except ImportError as e:
try:
from waymo_open_dataset.protos import scenario_pb2
except ImportError as e:
logger.warning(e, "\n Please install waymo_open_dataset package: pip install waymo-open-dataset-tf-2-11-0==1.5.0")
logger.warning(e, "\n Please install waymo_open_dataset package: pip install waymo-open-dataset-tf-2-11-0")
from metadrive.scenario import ScenarioDescription as SD
from metadrive.type import MetaDriveType
@@ -469,7 +469,7 @@ def read_from_files(arg):
try:
scenario_pb2
except NameError:
raise ImportError("Please install waymo_open_dataset package: pip install waymo-open-dataset-tf-2-11-0==1.5.0")
raise ImportError("Please install waymo_open_dataset package: pip install waymo-open-dataset-tf-2-11-0")
waymo_data_directory, file_list = arg[0], arg[1]
scenarios = []
for file in tqdm.tqdm(file_list):

View File

@@ -30,7 +30,7 @@ print("We will install the following packages: ", packages)
version = "0.0.1"
install_requires = [
"numpy>=1.21.6, <=1.24.2",
"numpy>=1.21.6",
"matplotlib",
"pandas",
"tqdm",
@@ -55,19 +55,20 @@ train_requirement = [
"tensorflow",
"tensorflow_probability"]
waymo = ["waymo-open-dataset-tf-2-11-0", "tensorflow==2.11.0"]
nuplan = ["nuplan-devkit>=1.2.0",
"bokeh==2.4",
"hydra-core",
"chardet",
"pyarrow",
"aiofiles",
"retry",
"boto3",
"aioboto3"]
nuscenes = ["nuscenes-devkit>=1.1.10"]
# Disable this kind of installation
# waymo = ["waymo-open-dataset-tf-2-11-0", "tensorflow==2.11.0"]
#
# nuplan = ["nuplan-devkit>=1.2.0",
# "bokeh==2.4",
# "hydra-core",
# "chardet",
# "pyarrow",
# "aiofiles",
# "retry",
# "boto3",
# "aioboto3"]
#
# nuscenes = ["nuscenes-devkit>=1.1.10"]
setup(
name="scenarionet",
@@ -82,10 +83,10 @@ setup(
extras_require={
"train": train_requirement,
"doc": doc,
"waymo": waymo,
"nuplan": nuplan,
"nuscenes": nuscenes,
"all": nuscenes + waymo + nuplan
# "waymo": waymo,
# "nuplan": nuplan,
# "nuscenes": nuscenes,
# "all": nuscenes + waymo + nuplan
},
include_package_data=True,
license="Apache 2.0",