diff --git a/.github/workflows/ci-auto-commit-linux.yml b/.github/workflows/ci-auto-commit-linux.yml index 39faf71c28..442db398af 100644 --- a/.github/workflows/ci-auto-commit-linux.yml +++ b/.github/workflows/ci-auto-commit-linux.yml @@ -32,7 +32,7 @@ jobs: python3.7 -m venv ${{env.venv_dir}} . ${{env.venv_dir}}/bin/activate pip install --upgrade pip wheel - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] - name: Update requirements run: | . ${{env.venv_dir}}/bin/activate diff --git a/.github/workflows/ci-auto-commit-mac.yml b/.github/workflows/ci-auto-commit-mac.yml index 307c360c29..fd269cc05b 100644 --- a/.github/workflows/ci-auto-commit-mac.yml +++ b/.github/workflows/ci-auto-commit-mac.yml @@ -27,7 +27,7 @@ jobs: python3.8 -m venv ${{env.venv_dir}} . ${{env.venv_dir}}/bin/activate pip install --upgrade pip wheel - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] pip freeze | grep -v 'smarts' | grep -v 'pkg-resources==0.0.0' > utils/setup/mac_requirements.txt - name: Commit changes uses: EndBug/add-and-commit@v7 diff --git a/.github/workflows/ci-base-tests-linux.yml b/.github/workflows/ci-base-tests-linux.yml index 29d01f53f3..d772bf0bb1 100644 --- a/.github/workflows/ci-base-tests-linux.yml +++ b/.github/workflows/ci-base-tests-linux.yml @@ -39,7 +39,7 @@ jobs: . ${{env.venv_dir}}/bin/activate pip install --upgrade pip pip install --upgrade wheel - pip install -e .[camera-obs,opendrive,rllib,test,test-notebook,torch,train,gym] + pip install -e .[camera_obs,opendrive,rllib,test,test_notebook,torch,train,gym] - name: Run smoke tests run: | . ${{env.venv_dir}}/bin/activate diff --git a/.github/workflows/ci-base-tests-mac.yml b/.github/workflows/ci-base-tests-mac.yml index 98d129be47..905647f700 100644 --- a/.github/workflows/ci-base-tests-mac.yml +++ b/.github/workflows/ci-base-tests-mac.yml @@ -47,7 +47,7 @@ jobs: pip install --upgrade pip pip install --upgrade wheel pip install -r utils/setup/mac_requirements.txt - pip install -e .[camera-obs,opendrive,rllib,test,test-notebook,torch,train] + pip install -e .[camera_obs,opendrive,rllib,test,test_notebook,torch,train] - name: Run smoke tests run: | . ${{env.venv_dir}}/bin/activate diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml index a79fd9f131..e813beb672 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/ci-format.yml @@ -59,7 +59,7 @@ jobs: python3.7 -m venv ${{env.venv_dir}} . ${{env.venv_dir}}/bin/activate pip install --upgrade pip wheel - pip install -e .[dev,camera-obs,train,test] + pip install -e .[dev,camera_obs,train,test] - name: Get changed files on branch since branching id: changed-files shell: bash diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml index 90a4d917df..8e23eea479 100644 --- a/.github/workflows/ci-pull-request.yml +++ b/.github/workflows/ci-pull-request.yml @@ -22,7 +22,7 @@ jobs: . ${{env.venv_dir}}/bin/activate pip install --upgrade pip pip install --upgrade wheel - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] - name: SMARTS benchmark run: | cd $GITHUB_WORKSPACE @@ -32,6 +32,6 @@ jobs: scl scenario build-all --clean ./scenarios pytest --benchmark-save=previous --benchmark-min-rounds=10 --benchmark-timer=time.process_time ./smarts/env/tests/test_benchmark.py git checkout - - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] scl scenario build-all --clean ./scenarios pytest --benchmark-compare=0001_previous --benchmark-compare-fail=mean:10% --benchmark-min-rounds=10 --benchmark-timer=time.process_time ./smarts/env/tests/test_benchmark.py \ No newline at end of file diff --git a/.github/workflows/ci-test-learning.yml b/.github/workflows/ci-test-learning.yml index 629988099f..22f4aa387a 100644 --- a/.github/workflows/ci-test-learning.yml +++ b/.github/workflows/ci-test-learning.yml @@ -27,7 +27,7 @@ jobs: . ${{env.venv_dir}}/bin/activate pip install --upgrade pip pip install wheel - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] - name: Verify learning run: | cd $GITHUB_WORKSPACE diff --git a/.github/workflows/ci-test-long-determinism.yml b/.github/workflows/ci-test-long-determinism.yml index b4cf041422..d81cb6feb5 100644 --- a/.github/workflows/ci-test-long-determinism.yml +++ b/.github/workflows/ci-test-long-determinism.yml @@ -26,7 +26,7 @@ jobs: python3.7 -m venv ${{env.venv_dir}} . ${{env.venv_dir}}/bin/activate pip install --upgrade pip - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] - name: Verify long determinism run: | cd $GITHUB_WORKSPACE diff --git a/.github/workflows/ci-test-memory-growth.yml b/.github/workflows/ci-test-memory-growth.yml index b414d82dcb..88ad4b0e08 100644 --- a/.github/workflows/ci-test-memory-growth.yml +++ b/.github/workflows/ci-test-memory-growth.yml @@ -28,7 +28,7 @@ jobs: pip install --upgrade pip pip install wheel pip install pympler - pip install .[camera-obs,rllib,test,torch,train] + pip install .[camera_obs,rllib,test,torch,train] - name: Test memory growth run: | cd $GITHUB_WORKSPACE diff --git a/README.md b/README.md index ee2444dea3..956680dd2e 100644 --- a/README.md +++ b/README.md @@ -96,10 +96,10 @@ source .venv/bin/activate pip install --upgrade pip # Install smarts with extras as needed. Extras include the following: -# `camera-obs` - needed for rendering camera sensor observations, and for testing. +# `camera_obs` - needed for rendering camera sensor observations, and for testing. # `test` - needed for testing. # `train` - needed for RL training and testing. -pip install -e '.[camera-obs,test,train]' +pip install -e '.[camera_obs,test,train]' # Run sanity-test and verify they are passing. # If tests fail, check './sanity_test_result.xml' for test report. diff --git a/docs/setup.rst b/docs/setup.rst index 5ee607e37c..af2f1f3266 100644 --- a/docs/setup.rst +++ b/docs/setup.rst @@ -29,8 +29,8 @@ To setup the simulator, which is called SMARTS, run the following commands, # install [train] version of python package with the rllib dependencies pip install -e .[train] - # OPTIONAL: install [camera-obs] version of python package with the panda3D dependencies if you want to render camera sensor observations in your simulations - pip install -e .[camera-obs] + # OPTIONAL: install [camera_obs] version of python package with the panda3D dependencies if you want to render camera sensor observations in your simulations + pip install -e .[camera_obs] # OPTIONAL: install [opendrive] version of python package with the OpenDRIVE related dependencies if you are using the any OpenDRIVE related scenarios pip install -e .[opendrive] diff --git a/docs/sim/observations.rst b/docs/sim/observations.rst index 563ef405b3..0434daaf64 100644 --- a/docs/sim/observations.rst +++ b/docs/sim/observations.rst @@ -102,7 +102,7 @@ See implementation in :class:`smarts.core.sensors` Then, you can choose the observations needed through :class:`smarts.core.agent_interface.AgentInterface` and process these raw observations through :class:`smarts.core.observation_adapter`. -Note: Some observations like `occupancy_grid_map`, `drivable_area_grid_map` and `top_down_rgb` requires the use of Panda3D package to render agent camera observations during simulations. So you need to install the required dependencies first using the command `pip install -e .[camera-obs]` +Note: Some observations like `occupancy_grid_map`, `drivable_area_grid_map` and `top_down_rgb` requires the use of Panda3D package to render agent camera observations during simulations. So you need to install the required dependencies first using the command `pip install -e .[camera_obs]` ======= Rewards diff --git a/examples/env/create_run_visualize.ipynb b/examples/env/create_run_visualize.ipynb index 6f8ba4463b..f4fda4e74b 100644 --- a/examples/env/create_run_visualize.ipynb +++ b/examples/env/create_run_visualize.ipynb @@ -22,7 +22,7 @@ "outputs": [], "source": [ "!git clone https://github.com/huawei-noah/SMARTS 2> /dev/null\n", - "!cd SMARTS && ls && git checkout develop && pip install .[camera-obs]" + "!cd SMARTS && ls && git checkout develop && pip install .[camera_obs]" ] }, { @@ -129,9 +129,6 @@ "name": "mock_demo.ipynb", "provenance": [] }, - "interpreter": { - "hash": "11a534571de20c647cd170207b7bb5d28d7f55463a5594e721a86394d5987d81" - }, "kernelspec": { "display_name": "Python 3.8.10 ('.venv': venv)", "language": "python", @@ -148,6 +145,11 @@ "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" + }, + "vscode": { + "interpreter": { + "hash": "94261e0756b8490ed1a668b85ed1da8c98261f1072b842b18d4e3da7517b644d" + } } }, "nbformat": 4, diff --git a/examples/multi_agent.ipynb b/examples/multi_agent.ipynb index c5ba734f5a..35f674f16e 100644 --- a/examples/multi_agent.ipynb +++ b/examples/multi_agent.ipynb @@ -22,7 +22,7 @@ "source": [ "# Install SMARTS\n", "!git clone https://github.com/huawei-noah/SMARTS /content/SMARTS\n", - "!cd SMARTS && ls && git checkout ipynb-test-deps && pip install .[camera-obs]" + "!cd SMARTS && ls && git checkout ipynb-test-deps && pip install .[camera_obs]" ] }, { @@ -166,7 +166,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.12" + "version": "3.7.13" }, "orig_nbformat": 4 }, diff --git a/examples/single_agent.ipynb b/examples/single_agent.ipynb index 30c87d88af..742dcd6ed3 100644 --- a/examples/single_agent.ipynb +++ b/examples/single_agent.ipynb @@ -22,7 +22,7 @@ "source": [ "# Install SMARTS\n", "!git clone https://github.com/huawei-noah/SMARTS /content/SMARTS\n", - "!cd SMARTS && ls && git checkout ipynb-test-deps && pip install .[camera-obs]" + "!cd SMARTS && ls && git checkout ipynb-test-deps && pip install .[camera_obs]" ] }, { diff --git a/setup.cfg b/setup.cfg index 8d251bd14c..5ca55512c1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -66,7 +66,7 @@ console_scripts = [options.extras_require] benchmark = py-cpuinfo==9.0.0 mdutils==1.4.0 -camera-obs = Panda3D==1.10.9 +camera_obs = Panda3D==1.10.9 panda3d-gltf==0.13 dev = black[jupyter]==22.6.0 grpcio-tools==1.32.0 @@ -91,7 +91,7 @@ test = # The following are for testing pytest-cov>=3.0.0 pytest-xdist>=2.4.0 pytest-forked>=1.4.0 -test-notebook = ipykernel>=4.10.1 +test_notebook = ipykernel>=4.10.1 jupyter-client>=7.1.2 pytest-notebook>=0.7.0 torch = torch==1.4.0 diff --git a/smarts/core/utils/custom_exceptions.py b/smarts/core/utils/custom_exceptions.py index 0730996d0b..24f226a59c 100644 --- a/smarts/core/utils/custom_exceptions.py +++ b/smarts/core/utils/custom_exceptions.py @@ -26,7 +26,7 @@ class RendererException(Exception): def required_to(cls, thing: str) -> "RendererException": """Generate a `RenderException` requiring a render to do `thing`.""" return cls( - f"""A renderer is required to {thing}. You may not have installed the [camera-obs] dependencies required to render the camera sensor observations. Install them first using the command `pip install -e .[camera-obs]` at the source directory.""" + f"""A renderer is required to {thing}. You may not have installed the [camera_obs] dependencies required to render the camera sensor observations. Install them first using the command `pip install -e .[camera_obs]` at the source directory.""" ) diff --git a/smarts/zoo/worker.py b/smarts/zoo/worker.py index 3f9f6c1253..137c296eb6 100755 --- a/smarts/zoo/worker.py +++ b/smarts/zoo/worker.py @@ -69,7 +69,7 @@ except ImportError: if mod == "panda3d": print( - "You need to install the panda3d dependency using pip install -e .[camera-obs] first" + "You need to install the panda3d dependency using pip install -e .[camera_obs] first" ) pass diff --git a/utils/docker/Dockerfile b/utils/docker/Dockerfile index 754f6f63e7..5658495865 100644 --- a/utils/docker/Dockerfile +++ b/utils/docker/Dockerfile @@ -44,7 +44,7 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt # Copy source files and install. COPY . /src WORKDIR /src -RUN pip install --no-cache-dir -e .[camera-obs,dev,rllib,test,torch,train] && \ +RUN pip install --no-cache-dir -e .[camera_obs,dev,rllib,test,torch,train] && \ cp -r /src/smarts.egg-info /media/smarts.egg-info # For Envision. diff --git a/utils/singularity/smarts.def b/utils/singularity/smarts.def index 568a89731c..be54213616 100644 --- a/utils/singularity/smarts.def +++ b/utils/singularity/smarts.def @@ -47,7 +47,7 @@ From: ubuntu:bionic # Copy source files and install SMARTS cd /src - pip install --no-cache-dir -e .[train,test,dev,camera-obs] + pip install --no-cache-dir -e .[train,test,dev,camera_obs] cp -r /src/smarts.egg-info /media/smarts.egg-info %environment