huawei-noah / SMARTS

Scalable Multi-Agent RL Training School for Autonomous Driving
MIT License
954 stars 190 forks source link

[Help Request] error in "make sanity-test" #2111

Closed n0xtua closed 1 year ago

n0xtua commented 1 year ago

High Level Description

I followed the instructions the setup page of the documentation, the only difference being I am using a conda. I am getting an error while running make sanity-test I am able to build scenarios and run the example scripts but I wanted to make sure that this won't be a problem in the future.

Conda version 22.9.0 Python version 3.9.18

Steps followed:

git clone https://github.com/huawei-noah/SMARTS.git
cd SMARTS
git checkout tags/v1.4.0
conda create -n SMARTS_v1.4.0 python=3.9
conda activate SMARTS_v1.4.0
bash utils/setup/install_deps.sh
python -m pip install -e .[all] 
make sanity-test

Version

v1.4.0

Operating System

Ubuntu 18.04.6

Problems

scl scenario build --clean scenarios/sumo/loop
Building: scenarios/sumo/loop
scl scenario build --clean scenarios/sumo/zoo_intersection
Building: scenarios/sumo/zoo_intersection
PYTHONPATH=/XXX/SMARTS PYTHONHASHSEED=42 pytest -v \
    --doctest-modules \
    --forked \
    --dist=loadscope \
    --junitxml="sanity_test_result.xml" \
    -n `expr \( \`nproc\` \/ 2 \& \`nproc\` \> 3 \) \| 2` \
    ./smarts/core/tests/test_python_version.py::test_python_version \
    ./smarts/core/tests/test_sumo_version.py::test_sumo_version \
    ./smarts/core/tests/test_dynamics_backend.py::test_set_pose \
    ./smarts/core/tests/test_sensors.py::test_waypoints_sensor \
    ./smarts/core/tests/test_smarts.py::test_smarts_doesnt_leak_tasks_after_reset \
    ./examples/tests/test_examples.py::test_examples[hiway_v1] \
    ./examples/tests/test_examples.py::test_examples[laner] \
    ./smarts/env/tests/test_social_agent.py::test_social_agents_not_in_env_obs_keys
/home/XXX/anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pytest_benchmark/logger.py:46: PytestBenchmarkWarning: Benchmarks are automatically disabled because xdist plugin is active.Benchmarks cannot be performed reliably in a parallelized environment.
  warner(PytestBenchmarkWarning(text))
=========================================================================================== test session starts ============================================================================================
platform linux -- Python 3.9.18, pytest-7.4.3, pluggy-1.3.0 -- /home/XXX/anaconda3/envs/SMARTS_v1.4.0/bin/python
cachedir: .pytest_cache
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/XXX/SMARTS
plugins: anyio-4.0.0, forked-1.6.0, xdist-3.4.0, hydra-core-1.3.2, cov-4.1.0, pytest_notebook-0.9.0, benchmark-4.0.0
32 workers [0 items]      
scheduling tests via LoadScopeScheduling

============================================================================================= warnings summary =============================================================================================
smarts/__init__.py:22: 32 warnings
  /home/XXX/SMARTS/smarts/__init__.py:22: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: 32 warnings
  /home/XXX/anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: 64 warnings
  /home/XXX/anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: 32 warnings
  /home/XXX/anaconda3/envs/SMARTS_v1.4.0/lib/python3.9/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---------------------------------------------------------- generated xml file: /home/XXX/SMARTS/sanity_test_result.xml ----------------------------------------------------------
========================================================================================== 160 warnings in 5.05s ===========================================================================================
Makefile:28: recipe for target 'sanity-test' failed
make: *** [sanity-test] Error 5
Gamenot commented 1 year ago

There was a bug in the 1.4.0 tag for sanity test which is fixed on the current HEAD.

        # These options do not exist.
    ./examples/tests/test_examples.py::test_examples[hiway_v1] \
    ./examples/tests/test_examples.py::test_examples[laner] \

The current file is fixed.

https://github.com/huawei-noah/SMARTS/blob/c164c5cf04f4d361d149788ac57bace0e4720b13/Makefile#L26-L40

Gamenot commented 1 year ago

If it helps I will release a 1.4.1 tag by tomorrow. It would contain mainly bugfixes.

n0xtua commented 1 year ago

Sure, that would be nice.

I was able to pass the sanity-test after removing the options you mentioned from the Makefile. Thanks for your help.