-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting up MARL Benchmark with SMARTS 0.6.1 #1126
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
579639f
path fixes
RutvikGupta 15a575c
path fixes and merge changes from marl-benchmark branch
RutvikGupta 71d3be1
update smarts package in setup.py
RutvikGupta 40c3bbd
refacotor the file structure of marl_benchmark
RutvikGupta 982c2d8
Updated CHANGELOG.md
RutvikGupta ddeae2c
Updated README.md and setup.py to resolve issues with training proced…
RutvikGupta ac6e5e0
update packages
RutvikGupta 702915d
update numpy package to remove tensor conversion error
RutvikGupta 837a770
update README.md
RutvikGupta c8ca70a
resolve ray issues by adding it as a dependency in setup.py
RutvikGupta 1383ec8
numpy version
RutvikGupta 60f7ed3
update SMARTS version to 0.5
RutvikGupta 82b4c7a
bug fixes
RutvikGupta 2d0536c
reformatting
RutvikGupta 9d3ea0e
evaluation fixes
RutvikGupta 10d7d5a
added missing checkpoint parameter and reformatting
RutvikGupta 9ff8c81
reformatting
RutvikGupta 33d8af1
reformatting
RutvikGupta d42b03c
bug fixes
RutvikGupta 8718c8e
fix the custom_preprocessor issue arising from training for centraliz…
RutvikGupta 023b527
fix the custom_preprocessor issue arising from training for centraliz…
RutvikGupta f3187d7
reformatting
RutvikGupta 5f4842f
fix the custom_preprocessor issue arising from training for centraliz…
RutvikGupta cc1b68d
Upgrade baselines.
Gamenot a640bce
Fix line endings from crlf to lf.
Gamenot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,19 +3,19 @@ | |
This directory contains the scenarios, training environment, and agents used in the CoRL20 paper: [SMARTS: Scalable Multi-Agent ReinforcementLearning Training School for Autonomous Driving](...). | ||
|
||
**Contents,** | ||
- `agents/`: YAML files and some RLlib-based policy implementations | ||
- `metrics/`: Class definition of metrics (default by a basic Metric class) | ||
- `networks/`: Custom network implementations | ||
- `communicate.py`: Used for Networked agent learning | ||
- `scenarios/`: Contains three types of scenarios tested in the paper | ||
- `wrappers/`: Environment wrappers | ||
- `evaluate.py`: The evaluation program | ||
- `run.py`: Executes multi-agent training | ||
- `marl_benchmark/agents/`: YAML files and some RLlib-based policy implementations | ||
- `marl_benchmark/metrics/`: Class definition of metrics (default by a basic Metric class) | ||
- `marl_benchmark/networks/`: Custom network implementations | ||
- `marl_benchmark/communicate.py`: Used for Networked agent learning | ||
- `marl_benchmark/scenarios/`: Contains three types of scenarios tested in the paper | ||
- `marl_benchmark/wrappers/`: Environment wrappers | ||
- `marl_benchmark/evaluate.py`: The evaluation program | ||
- `marl_benchmark/run.py`: Executes multi-agent training | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like prepending the new folder name just adds noise to the documentation. |
||
|
||
## Setup | ||
```bash | ||
# git clone ... | ||
cd <projec/baseline/marl_benchmark> | ||
cd <project/baseline/marl_benchmark> | ||
|
||
# setup virtual environment; presently at least Python 3.7 and higher is officially supported | ||
python3.7 -m venv .venv | ||
|
@@ -31,25 +31,36 @@ pip install -e . | |
|
||
## Running | ||
|
||
If you have not already, it is suggested you checkout the benchmark branch. | ||
Build the scenario we want to run the procedure on, | ||
|
||
```bash | ||
$ git checkout marl_benchmark | ||
# from baselines/marl_benchmark/marl_benchmark/ | ||
scl scenario build --clean <scenario_path> | ||
# E.x. scl scenario build --clean scenarios/intersections/4lane | ||
``` | ||
|
||
To run the training procedure, | ||
|
||
```bash | ||
# from baselines/marl_benchmark/ | ||
# from baselines/marl_benchmark/marl_benchmark/ | ||
$ python3.7 run.py <scenario> -f <config_file> | ||
# E.x. python3.7 run.py scenarios/intersections/4lane -f agents/ppo/baseline-lane-control.yaml | ||
# E.x. python3.7 run.py scenarios/intersections/4lane -f agents/ppo/baseline-lane-control.yaml --headless | ||
``` | ||
|
||
To run the evaluation procedure for multiple algorithms, | ||
To run the evaluation procedure for multiple algorithms, first modify the checkpoint parameter at | ||
agents/{agent_used_for_training}/baseline-lane-control.yaml to the filepath where the parameter was stored, | ||
```yaml | ||
checkpoint: | ||
./log/results/run/4lane-4/PPO_FrameStack_0_2021-01-25_17-03-39ssr7i8t5/checkpoint_4/checkpoint-4 | ||
``` | ||
|
||
Then, you can run the evaluation as below, (Optionally you can pass the --checkpoint parameter below to override the | ||
checkpoint filepath name) | ||
```bash | ||
# from baselines/marl_benchmark/ | ||
# from baselines/marl_benchmark/marl_benchmark/ | ||
$ python evaluate.py <scenario> -f <config_files> | ||
# E.x. python3.7 evaluate.py scenarios/intersections/4lane \ | ||
# -f agents/ppo/baseline-lane-control.yaml \ | ||
# --checkpoint ./log/results/run/4lane-4/PPO_Simple_977c1_00000_0_2020-10-14_00-06-10 | ||
# --checkpoint ./log/results/run/4lane-4/PPO_Simple_977c1_00000_0_2020-10-14_00-06-10/checkpoint_4/checkpoint-4 \ | ||
# --headless | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.