Skip to content

Commit

Permalink
Release 0 4 16 (#841)
Browse files Browse the repository at this point in the history
See README
  • Loading branch information
Gamenot authored May 11, 2021
1 parent 6cb8ffd commit c5a1608
Show file tree
Hide file tree
Showing 102 changed files with 2,616 additions and 1,476 deletions.
108 changes: 108 additions & 0 deletions .github/workflows/ci-smarts-run-ultra-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: SMARTS scheduled run of ULTRA tests

on:
schedule:
- cron: '0 11 * * 3'
# Time is in UTC
# Runs at 11.00pm, UTC , every Wednesday
# Runs at 7.00pm, UTC-4, every Wednesday
workflow_dispatch:


# Should be the same as ci-ultra-tests
jobs:
test-base:
runs-on: ubuntu-18.04
container: huaweinoah/smarts:v0.4.13-minimal
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: develop
- name: Setup X11
run: |
/usr/bin/Xorg \
-noreset \
+extension GLX \
+extension RANDR \
+extension RENDER \
-logfile ./xdummy.log \
-config /etc/X11/xorg.conf :1 &
- name: Install dependencies
run: |
cd ultra
python3.7 -m venv .venv
. .venv/bin/activate
pip install --upgrade --upgrade-strategy eager pip
pip install --upgrade --upgrade-strategy eager wheel
pip install --upgrade -e .
pip install --upgrade numpy
- name: Run ultra tests
run: |
cd ultra
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/
test-package-via-setup:
runs-on: ubuntu-18.04
container: huaweinoah/smarts:v0.4.13-minimal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup X11
run: |
/usr/bin/Xorg \
-noreset \
+extension GLX \
+extension RANDR \
+extension RENDER \
-logfile ./xdummy.log \
-config /etc/X11/xorg.conf :1 &
- name: Install ultra-rl via setup.py
run: |
cd ultra
python3.7 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install --upgrade -e .
pip install --upgrade numpy
- name: Run test
run: |
cd ultra
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/test_ultra_package.py
test-package-via-wheel:
runs-on: ubuntu-18.04
container: huaweinoah/smarts:v0.4.13-minimal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup X11
run: |
/usr/bin/Xorg \
-noreset \
+extension GLX \
+extension RANDR \
+extension RENDER \
-logfile ./xdummy.log \
-config /etc/X11/xorg.conf :1 &
- name: Install ultra-rl via whl file
run: |
cd ultra
python3.7 -m venv .venv
. .venv/bin/activate
pip install --upgrade --upgrade-strategy eager pip
pip install --upgrade --upgrade-strategy eager wheel
pip install --upgrade --upgrade-strategy eager -e .
python setup.py bdist_wheel
cd dist
pip install $(ls . | grep ultra)
pip install --upgrade numpy
cd ..
- name: Run test
run: |
cd ultra
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/test_ultra_package.py
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-learning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: '0 23 * * 2'
# Time is in UTC
# Runs at 11.00pm, UTC , every Tuesday
# Runs at 6.00pm, UTC-5, every Tuesday
# Runs at 7.00pm, UTC-4, every Tuesday
workflow_dispatch:

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-long-determinism.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: '0 23 * * 6'
# Time is in UTC
# Runs at 11.00pm, UTC , every Saturday
# Runs at 6.00pm, UTC-5, every Saturday
# Runs at 7.00pm, UTC-4, every Saturday
workflow_dispatch:

env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-memory-growth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: '0 23 * * 4'
# Time is in UTC
# Runs at 11.00pm, UTC , every Thursday
# Runs at 6.00pm, UTC-5, every Thursday
# Runs at 7.00pm, UTC-4, every Thursday
workflow_dispatch:

env:
Expand Down
72 changes: 65 additions & 7 deletions .github/workflows/ci-ultra-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: ULTRA CI Base Tests

on: [push, pull_request]
on:
push:
branches:
- ultra-**
- ultra_**
- ultra/**
pull_request:
branches:
- ultra-**
- ultra_**
- ultra/**

jobs:
test-base:
test-heavy-base-tests:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: huaweinoah/smarts:v0.4.13-minimal
Expand All @@ -28,12 +38,58 @@ jobs:
pip install --upgrade --upgrade-strategy eager wheel
pip install --upgrade -e .
pip install --upgrade numpy
- name: Run ultra tests
- name: Run ultra tests (heavy)
run: |
cd ultra
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/
pytest -v \
./tests/ \
--ignore=./tests/test_ultra_package.py \
--ignore=./tests/test_adapter.py \
--ignore=./tests/test_env.py \
--ignore=./tests/test_episodes.py \
--ignore=./tests/test_scenarios.py \
--ignore=./tests/test_social_vehicles.py \
--ignore=./tests/test_rllib_train.py \
test-light-base-tests:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
container: huaweinoah/smarts:v0.4.13-minimal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup X11
run: |
/usr/bin/Xorg \
-noreset \
+extension GLX \
+extension RANDR \
+extension RENDER \
-logfile ./xdummy.log \
-config /etc/X11/xorg.conf :1 &
- name: Install dependencies
run: |
cd ultra
python3.7 -m venv .venv
. .venv/bin/activate
pip install --upgrade --upgrade-strategy eager pip
pip install --upgrade --upgrade-strategy eager wheel
pip install --upgrade -e .
pip install --upgrade numpy
- name: Run ultra tests (light)
run: |
cd ultra
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v \
./tests/ \
--ignore=./tests/test_ultra_package.py \
--ignore=./tests/test_train.py \
--ignore=./tests/test_evaluate.py \
--ignore=./tests/test_analysis.py \
test-package-via-setup:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -64,6 +120,7 @@ jobs:
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/test_ultra_package.py
test-package-via-wheel:
runs-on: ubuntu-18.04
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -85,9 +142,9 @@ jobs:
cd ultra
python3.7 -m venv .venv
. .venv/bin/activate
pip install --upgrade --upgrade-strategy eager pip
pip install --upgrade --upgrade-strategy eager wheel
pip install --upgrade --upgrade-strategy eager -e .
pip install --upgrade pip
pip install --upgrade -e .
pip install --upgrade numpy
python setup.py bdist_wheel
cd dist
pip install $(ls . | grep ultra)
Expand All @@ -99,6 +156,7 @@ jobs:
. .venv/bin/activate
scl scenario build-all ultra/scenarios/pool
pytest -v ./tests/test_ultra_package.py
# test-package-via-pypi:
# runs-on: ubuntu-18.04
# if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ wheels/
.installed.cfg
.DS_Store
MANIFEST
sanity_test_result.xml
pip-wheel-metadata/

# PyInstaller
Expand Down Expand Up @@ -96,6 +97,7 @@ venv
*.rou.alt.xml
*.rou.xml
*.trips.xml
shifted_map-AUTOGEN.net.xml
*.egg
*.glb
*flamegraph-perf.log
Expand All @@ -112,6 +114,7 @@ traffic_histories.pkl

# but keep model assets
!**/models/*.glb
*.blend1

# run logs
_run_logs
Expand Down
29 changes: 26 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,38 @@ All text added must be human readable.

Copy and pasting the git commit messages is __NOT__ enough.

## [Unrealeased]
## [Unreleased]

## [0.4.16] - 2021-05-11
### Added
- Added `sanity-test` script and asked new users to run `sanity-test` instead of `make test` to ease the setup
process
- Added `on_shoulder` as part of events in observation returned from each step of simulation
- Added description of map creation and how to modify the map to allow users to create their own traffic routes in docs
- Added reference to SMARTS paper in front page of docs
- Only create `Renderer` on demand if vehicles are using camera-based sensors. See issue #725.
- Added glb models for pedestrians and motorcycles
- Added `near realtime` mode and `uncapped` mode in Envision
- Added `--allow-offset-map` option for `scl scenario build` to prevent auto-shifting of Sumo road networks
- Added options in `DoneCriteria` to trigger ego agent to be done based on other agent's done situation
### Changed
- Refactored SMARTS class to not inherit from Panda3D's ShowBase; it's aggregated instead. See issue #597.
### Fixed
- Fixed the bug of events such as off_road not registering in observation when off_road is set to false in DoneCriteria
- Fixed Sumo road network offset bug for shifted maps. See issue #716.
- Fixed traffic generation offset bug for shifted maps. See issue #790.
- Fixed bugs in traffic history and changed interface to it. See issue #732.
- Update `ego_open_agent` to use the package instead of the zoo directory version.
- Quieted error logs generated by failed Envision connections as well as noisy pybullet log messages. See issue #819.

## [0.4.15] - 2021-03-18
### Added
- This CHANGELOG as a change log to help keep track of changes in the SMARTS project that can get easily lost.
- Hosted Documentation on `readthedocs` and pointed to the smarts paper and useful parts of the documentation in the README.
- Running imitation learning will now create a cached history_mission.pkl file in scenario folder that stores
- Running imitation learning will now create a cached `history_mission.pkl` file in scenario folder that stores
the missions for all agents.
- Added ijson as a dependency.
- Added cached_property as a dependency.
- Added `cached_property` as a dependency.
### Changed
- Lowered CPU cost of waypoint generation. This will result in a small increase in memory usage.
- Set the number of processes used in `make test` to ignore 2 CPUs if possible.
Expand All @@ -30,6 +52,7 @@ we now initially shift road networks (maps) that are offset back to the origin
using [netconvert](https://sumo.dlr.de/docs/netconvert.html).
We adapt Sumo vehicle positions to take this into account to allow Sumo to continue
using the original coordinate system. See Issue #325.
- This fix will require all Scenarios to be rebuilt (`scl scenario build-all --clean ./scenarios`).
- Cleanly close down the traffic history provider thread. See PR #665.
- Improved the disposal of a SMARTS instance. See issue #378.
- Envision now resumes from current frame after un-pausing.
Expand Down
2 changes: 1 addition & 1 deletion minimal.Dockerfile → Dockerfile.minimal
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# ```bash
# $ export VERSION=v0.4.13
# $ cd /path/to/SMARTS
# $ docker build -t huaweinoah/smarts:$VERSION-minimal -f minimal.Dockerfile .
# $ docker build -t huaweinoah/smarts:$VERSION-minimal -f Dockerfile.minimal .
# $ docker push huaweinoah/smarts:$VERSION-minimal
# ```

Expand Down
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,24 @@ test: build-all-scenarios
--ignore=./smarts/env/tests/test_learning.py \
-k 'not test_long_determinism'

.PHONY: sanity-test
sanity-test: build-all-scenarios
./tests/test_setup.py
PYTHONHASHSEED=42 pytest -v \
--doctest-modules \
--forked \
--dist=loadscope \
--junitxml="sanity_test_result.xml" \
-n `nproc --ignore 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 \
./tests/test_examples.py::test_examples[multi_agent] \
./tests/test_examples.py::test_multi_instance_example \
./smarts/env/tests/test_social_agent.py::test_social_agents

.PHONY: test-learning
test-learning: build-all-scenarios
pytest -v -s -o log_cli=1 -o log_cli_level=INFO ./smarts/env/tests/test_learning.py
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ pip install --upgrade pip
# install [train] version of python package with the rllib dependencies
pip install -e .[train]

# make sure you can run tests (and verify they are passing)
# make sure you can run sanity-test (and verify they are passing)
# if tests fail, check './sanity_test_result.xml' for test report.
pip install -e .[test]
make test
make sanity-test

# then you can run a scenario, see following section for more details
```
Expand Down Expand Up @@ -291,9 +292,10 @@ If you use SMARTS in your research, please cite the [paper](https://arxiv.org/ab
@misc{zhou2020smarts,
title={SMARTS: Scalable Multi-Agent Reinforcement Learning Training School for Autonomous Driving},
author={Ming Zhou and Jun Luo and Julian Villella and Yaodong Yang and David Rusu and Jiayu Miao and Weinan Zhang and Montgomery Alban and Iman Fadakar and Zheng Chen and Aurora Chongxi Huang and Ying Wen and Kimia Hassanzadeh and Daniel Graves and Dong Chen and Zhengbang Zhu and Nhat Nguyen and Mohamed Elsayed and Kun Shao and Sanjeevan Ahilan and Baokuan Zhang and Jiannan Wu and Zhengang Fu and Kasra Rezaee and Peyman Yadmellat and Mohsen Rohani and Nicolas Perez Nieves and Yihan Ni and Seyedershad Banijamali and Alexander Cowen Rivers and Zheng Tian and Daniel Palenicek and Haitham bou Ammar and Hongbo Zhang and Wulong Liu and Jianye Hao and Jun Wang},
url={https://arxiv.org/abs/2010.09776},
primaryClass={cs.MA},
booktitle={Proceedings of the 4th Conference on Robot Learning (CoRL)},
year={2020},
eprint={2010.09776},
archivePrefix={arXiv},
primaryClass={cs.MA}
}
month={11}
}
```
Loading

0 comments on commit c5a1608

Please sign in to comment.