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:
@@ -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.
|
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::
|
For Waymo data, please install the toolkit via::
|
||||||
|
|
||||||
pip install waymo-open-dataset-tf-2-11-0==1.5.0
|
pip install waymo-open-dataset-tf-2-11-0
|
||||||
|
pip install tensorflow==2.11.0
|
||||||
# Or install with scenarionet
|
|
||||||
pip install -e .[waymo]
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
This package is only supported on Linux platform.
|
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.
|
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`.
|
Guidance on how to setup these datasets and connect them with ScenarioNet can be found at :ref:`datasets`.
|
||||||
|
|||||||
@@ -67,26 +67,8 @@ For ScenarioNet, we only provide Github installation::
|
|||||||
|
|
||||||
git clone git@github.com:metadriverse/scenarionet.git
|
git clone git@github.com:metadriverse/scenarionet.git
|
||||||
cd scenarionet
|
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 .
|
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::
|
.. note::
|
||||||
If you don't wanna access the source code, you can install these two packages with
|
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``
|
``pip install git+https://github.com/metadriverse/scenarionet.git``
|
||||||
|
|||||||
@@ -30,9 +30,6 @@ First of all, we have to install the ``nuplan-devkit``.
|
|||||||
# 2. or install from PyPI
|
# 2. or install from PyPI
|
||||||
pip install nuplan-devkit
|
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.
|
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.
|
The examples are useful to verify whether the installation and dataset setup is correct or not.
|
||||||
|
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ First of all, we have to install the ``nuscenes-devkit``.
|
|||||||
# or install from PyPI
|
# or install from PyPI
|
||||||
pip install nuscenes-devkit
|
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.
|
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.
|
The examples are useful to verify whether the installation and dataset setup is correct or not.
|
||||||
|
|
||||||
|
|||||||
@@ -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 waymo-open-dataset-tf-2-11-0
|
||||||
pip install tensorflow==2.11.0
|
pip install tensorflow==2.11.0
|
||||||
|
|
||||||
# Or install with scenarionet
|
|
||||||
pip install -e .[waymo]
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
This package is only supported on Linux platform.
|
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
|
2. Download TFRecord
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ except ImportError as e:
|
|||||||
try:
|
try:
|
||||||
from waymo_open_dataset.protos import scenario_pb2
|
from waymo_open_dataset.protos import scenario_pb2
|
||||||
except ImportError as e:
|
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.scenario import ScenarioDescription as SD
|
||||||
from metadrive.type import MetaDriveType
|
from metadrive.type import MetaDriveType
|
||||||
@@ -469,7 +469,7 @@ def read_from_files(arg):
|
|||||||
try:
|
try:
|
||||||
scenario_pb2
|
scenario_pb2
|
||||||
except NameError:
|
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]
|
waymo_data_directory, file_list = arg[0], arg[1]
|
||||||
scenarios = []
|
scenarios = []
|
||||||
for file in tqdm.tqdm(file_list):
|
for file in tqdm.tqdm(file_list):
|
||||||
|
|||||||
37
setup.py
37
setup.py
@@ -30,7 +30,7 @@ print("We will install the following packages: ", packages)
|
|||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
"numpy>=1.21.6, <=1.24.2",
|
"numpy>=1.21.6",
|
||||||
"matplotlib",
|
"matplotlib",
|
||||||
"pandas",
|
"pandas",
|
||||||
"tqdm",
|
"tqdm",
|
||||||
@@ -55,19 +55,20 @@ train_requirement = [
|
|||||||
"tensorflow",
|
"tensorflow",
|
||||||
"tensorflow_probability"]
|
"tensorflow_probability"]
|
||||||
|
|
||||||
waymo = ["waymo-open-dataset-tf-2-11-0", "tensorflow==2.11.0"]
|
# 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",
|
# nuplan = ["nuplan-devkit>=1.2.0",
|
||||||
"hydra-core",
|
# "bokeh==2.4",
|
||||||
"chardet",
|
# "hydra-core",
|
||||||
"pyarrow",
|
# "chardet",
|
||||||
"aiofiles",
|
# "pyarrow",
|
||||||
"retry",
|
# "aiofiles",
|
||||||
"boto3",
|
# "retry",
|
||||||
"aioboto3"]
|
# "boto3",
|
||||||
|
# "aioboto3"]
|
||||||
nuscenes = ["nuscenes-devkit>=1.1.10"]
|
#
|
||||||
|
# nuscenes = ["nuscenes-devkit>=1.1.10"]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="scenarionet",
|
name="scenarionet",
|
||||||
@@ -82,10 +83,10 @@ setup(
|
|||||||
extras_require={
|
extras_require={
|
||||||
"train": train_requirement,
|
"train": train_requirement,
|
||||||
"doc": doc,
|
"doc": doc,
|
||||||
"waymo": waymo,
|
# "waymo": waymo,
|
||||||
"nuplan": nuplan,
|
# "nuplan": nuplan,
|
||||||
"nuscenes": nuscenes,
|
# "nuscenes": nuscenes,
|
||||||
"all": nuscenes + waymo + nuplan
|
# "all": nuscenes + waymo + nuplan
|
||||||
},
|
},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
license="Apache 2.0",
|
license="Apache 2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user