-
Notifications
You must be signed in to change notification settings - Fork 334
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
[Environment, Docs] SMACv2 and docs on action masking #1466
Conversation
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
# SC2PATH is set in run_test.sh | ||
printf "* Installing StarCraft 2 and SMACv2 maps into '${root_dir}/smacv2/StarCraftII'\n" | ||
cd "${root_dir}" | ||
# TODO: discuss how we can cache it to avoid downloading ~4 GB on each run. |
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.
To discuss
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.
oh yeah 4gb is big
IDK how to cache things with our GHA CI though.
@osalpekar How can we cache big files with our GHA worflows?
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
# Conflicts: # test/test_specs.py # torchrl/data/tensor_specs.py # torchrl/envs/transforms/transforms.py # torchrl/modules/distributions/discrete.py
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
# Conflicts: # test/test_libs.py
# Conflicts: # .github/unittest/linux_libs/scripts_smacv2/environment.yml # .github/unittest/linux_libs/scripts_smacv2/install.sh # .github/unittest/linux_libs/scripts_smacv2/post_process.sh # .github/unittest/linux_libs/scripts_smacv2/run-clang-format.py # .github/unittest/linux_libs/scripts_smacv2/run_test.sh # .github/unittest/linux_libs/scripts_smacv2/setup_env.sh # docs/source/reference/envs.rst
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
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.
Almost there, great work!
|
||
jobs: | ||
unittests: | ||
if: ${{ github.event.label.name == 'Environments' }} |
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.
shouldn't this be in
on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:
?
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.
The way they instruct to do it in the posts we saw was this no?
https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label
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.
The thing i wonder is if this will be run on main
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.
I don't think it will
To me, the on
block will go first and check that it's on main. Then the job unittests
will be run but the if
statement will always be false.
I think this condition goes under on: pull_request
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.
i don't think conditions can be put there
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]>
@@ -17,7 +17,7 @@ concurrency: | |||
|
|||
jobs: | |||
unittests: | |||
if: contains(github.event.pull_request.labels.*.name, 'Environments') | |||
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Environments')) || (github.event_name == 'push') }} |
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.
if you run every time you push you can avoid checking the label name too no?
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.
i am still working on it, i thought the push event is onlly triggered on the listed branches, therefore the label is checked for prs
Ok I think I have reached a current working solution. My hypothesis is that now the tests will be run either on PR events with the proper label or on pushes to these branches I have tested the labelling PR filtering, but ofc the fact that this will run in main is not tested |
another alternative i see is creating 2 workflow files for smac
|
Signed-off-by: Matteo Bettini <[email protected]> Co-authored-by: vmoens <[email protected]>
Signed-off-by: Matteo Bettini <[email protected]> Co-authored-by: vmoens <[email protected]>
Depends on #1421
To be closed: #56
To be closed: #810
SMAC integration was started in #810, this PR aims to integrate SMACv2
Smacv2 is the second version of the popular SMAC enviornment challenge, popular as one of the most used multi-agent benchmarks.
This PR is focused on integrating SMACv2 in torchRL
For more info you can see https://github.com/oxwhirl/smacv2
This PR also introduces the documentation on how to update the action mask for environments with changing available actions.
@ordinskiy