Skip to content
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

Merge: Merge Dev into Main for Release #439

Merged
merged 937 commits into from
Feb 25, 2022
Merged
Changes from 1 commit
Commits
Show all changes
937 commits
Select commit Hold shift + click to select a range
de31b9c
Docstring coverage.
jcformanek Jan 26, 2022
805d0a7
Small change.
jcformanek Jan 26, 2022
fa70c50
Remove DIAL tests.
jcformanek Jan 26, 2022
38ace52
Fix test.
jcformanek Jan 27, 2022
4f60993
Formatting fixes.
jcformanek Jan 27, 2022
9adb204
Small docstring fix.
jcformanek Jan 27, 2022
1048527
Typing errors.
jcformanek Jan 27, 2022
57aba3a
More typing errors.
jcformanek Jan 27, 2022
94c2c83
Typo.
jcformanek Jan 27, 2022
0de21ff
Type ignore in test.
jcformanek Jan 27, 2022
edad908
Docstrings.
jcformanek Jan 27, 2022
30661d1
Flatland wrapper import error.
jcformanek Jan 27, 2022
476b1b5
Fix mypy issues.
jcformanek Jan 27, 2022
97bae04
Fixed tf.function bug. Big system speed-up.
jcformanek Jan 28, 2022
018665a
Doc strings.
jcformanek Jan 28, 2022
3216e41
Added tests for VDN and QMIX. Fixed MADQN test.
RuanJohn Jan 28, 2022
b9b52bc
Merge branch 'fix/madqn' of github.com:instadeepai/Mava into fix/madqn
jcformanek Jan 28, 2022
48f902a
Fixes.
jcformanek Jan 28, 2022
5188b9b
chore: Updated default minibatch size.
KaleabTessera Jan 28, 2022
f7b24ec
feat: Used tf datasets to speed up minibatchs.
KaleabTessera Jan 28, 2022
cfa18f9
chore: Updated typing.
KaleabTessera Jan 28, 2022
fe3ddaa
Fix old comments.
jcformanek Jan 31, 2022
6598131
feat: Performance and alg improves to ppo.
KaleabTessera Jan 31, 2022
70f2c97
chore: Updated default minibatch_size.
KaleabTessera Jan 31, 2022
dec6a35
Merge remote-tracking branch 'origin/develop' into feature/ppo_multip…
KaleabTessera Jan 31, 2022
6bd3dca
feat: Added mappo multiw example.
KaleabTessera Jan 31, 2022
bd1d664
chore: Changed train_batch_size -> batch_size.
KaleabTessera Jan 31, 2022
beb9952
fix: title was not bold in issue template
arnupretorius Feb 1, 2022
434f74d
feature: maintenance issue template
arnupretorius Feb 1, 2022
3b21525
chore: update contribute doc with maintenance branch name suggestion
arnupretorius Feb 1, 2022
976d086
Merge pull request #368 from instadeepai/feature/maintainace-issue-te…
arnupretorius Feb 1, 2022
3b3dc07
Fixed broken launchpad link
sash-a Feb 1, 2022
1730d03
Merge branch 'develop' into feature/ppo_multiple_train_steps
arnupretorius Feb 1, 2022
025b9a3
feat: Updated gae advantage calculation.
KaleabTessera Feb 1, 2022
636dce4
Merge remote-tracking branch 'origin/feature/ppo_multiple_train_steps…
KaleabTessera Feb 1, 2022
0d2985b
chore: Updated docstrings.
KaleabTessera Feb 2, 2022
17c90cd
chore: Increased docstring code coverage.
KaleabTessera Feb 2, 2022
d5ec3a3
chore: Updated num epochs in some ppo examples.
KaleabTessera Feb 2, 2022
1b8c164
feat: Updated entopy calculation and backward pass through observatio…
KaleabTessera Feb 2, 2022
1a8a5b3
Fix docstring in examples.
jcformanek Feb 2, 2022
26016ce
Fix docstrings in MADQN system.
jcformanek Feb 2, 2022
55e7694
Fix docstrings in Value Decomposition system.
jcformanek Feb 2, 2022
219a277
Fix docstrings in wrappers and utils.
jcformanek Feb 2, 2022
9adb7d0
Add Value Decomposition README.
jcformanek Feb 2, 2022
f66be7f
Fix imports when users have not installed SMAC or Flatland.
jcformanek Feb 2, 2022
afb5eab
Small typo in RAEDME.
jcformanek Feb 2, 2022
18c156a
Fix mixer docstrings.
jcformanek Feb 2, 2022
4bc0ae3
Merge branch 'develop' into fix/madqn
jcformanek Feb 2, 2022
f59545c
Fix import error in test.
jcformanek Feb 2, 2022
7dd5c20
More import fixes for flatland and smac.
jcformanek Feb 2, 2022
51a94ab
Reformating error.
jcformanek Feb 2, 2022
c5bab20
fix: Updated dockerfile for missing updates.
KaleabTessera Feb 2, 2022
26883f4
feat: filter docker image push based on label.
KaleabTessera Feb 2, 2022
a5ac592
fix: Updated github actions if statement.
KaleabTessera Feb 2, 2022
f004e0f
fix: Updated github actions if statement.
KaleabTessera Feb 2, 2022
c80d8c8
fix: Updated pull request condition.
KaleabTessera Feb 2, 2022
f487d6b
fix: Updated sha for image tag.
KaleabTessera Feb 2, 2022
05df178
fix: Updated sha for image tag.
KaleabTessera Feb 2, 2022
9dbe141
Merge pull request #370 from sash-a/dev_sasha
KaleabTessera Feb 2, 2022
ce76057
Merge branch 'develop' into feature/ppo_multiple_train_steps
KaleabTessera Feb 2, 2022
bf5e115
Merge branch 'develop' into feature/filter-docker-push-based-on-label
KaleabTessera Feb 2, 2022
0991973
Merge branch 'develop' into fix/madqn
jcformanek Feb 2, 2022
ef12939
chore: update readme with new updates from the dev team and roadmap a…
arnupretorius Feb 2, 2022
db5977e
fix: resolve merge conflicts
arnupretorius Feb 2, 2022
ae5644a
feature: internal feature implementation issue template
arnupretorius Feb 2, 2022
63a9c2e
fix: remove squase and delete option from checklist - N/A
arnupretorius Feb 2, 2022
2634006
feature: internal bug issue template
arnupretorius Feb 2, 2022
75f69bf
chore: rename bug fix internal issue template
arnupretorius Feb 2, 2022
fc8de5e
chore: change issue template name
arnupretorius Feb 2, 2022
88a9878
chore: minor update to subtitle
arnupretorius Feb 2, 2022
67c6aab
Merge pull request #375 from instadeepai/feature/filter-docker-push-b…
arnupretorius Feb 3, 2022
8be1abc
Merge branch 'develop' into fix/madqn
jcformanek Feb 3, 2022
95b4112
feat: benchmarking issue template
arnupretorius Feb 3, 2022
7e53d35
Merge branch 'develop' into feature/internal-benchmarking-issue-template
arnupretorius Feb 3, 2022
a6a16d6
fix: update checlist for maintenance template
arnupretorius Feb 3, 2022
81dcd15
fix: checklist for feature request template
arnupretorius Feb 3, 2022
de95ada
style: change headings for consistency
arnupretorius Feb 3, 2022
84d5cca
chore: expand code owner list for better code review
arnupretorius Feb 3, 2022
5c1f5d7
style: update headings for consistency with other templates
arnupretorius Feb 3, 2022
832b9d1
fix: minor
arnupretorius Feb 3, 2022
cacd92a
chore: improve readibility of readme
arnupretorius Feb 3, 2022
93dae4f
Merge branch 'develop' into maintenance/update-readme
arnupretorius Feb 4, 2022
559a0f8
Merge pull request #378 from instadeepai/maintenance/update-readme
arnupretorius Feb 4, 2022
f258065
Merge branch 'develop' into maintenance/udpate-code-owners
arnupretorius Feb 4, 2022
622ec67
Merge pull request #390 from instadeepai/maintenance/udpate-code-owners
arnupretorius Feb 4, 2022
86b8aff
Merge branch 'develop' into feature/internal-feature-issue-template
arnupretorius Feb 4, 2022
ef36f0b
Merge pull request #379 from instadeepai/feature/internal-feature-iss…
arnupretorius Feb 4, 2022
df2f176
Merge branch 'develop' into feature/internal-bug-issue-template
arnupretorius Feb 4, 2022
4a07f05
Merge pull request #381 from instadeepai/feature/internal-bug-issue-t…
AsadJeewa Feb 4, 2022
66e8845
Merge branch 'develop' into feature/internal-benchmarking-issue-template
arnupretorius Feb 4, 2022
cdcf027
fix: update with reviewer suggestsions
arnupretorius Feb 4, 2022
fbbc0ab
Merge branch 'develop' into fix/checklist-for-issue-templates
arnupretorius Feb 4, 2022
40d4062
fix: Fixed conventional commit pre-commit hook not running.
KaleabTessera Feb 7, 2022
d77b2db
Added random seed back to madqn system and executors
RuanJohn Feb 7, 2022
a1d0419
chore: Updated end behaviour import
KaleabTessera Feb 7, 2022
b74985c
feat: Improved performance of mappo adders.
KaleabTessera Feb 7, 2022
2f000a7
Merge branch 'develop' into feature/ppo_multiple_train_steps
KaleabTessera Feb 7, 2022
33c5ae5
Merge branch 'develop' into fix/madqn
jcformanek Feb 7, 2022
f4e193d
fix: main README system implementation table
jcformanek Feb 7, 2022
0cc5e08
Merge pull request #385 from instadeepai/feature/internal-benchmarkin…
arnupretorius Feb 7, 2022
746722e
fix: mad4pg docstrings
jcformanek Feb 7, 2022
1a8f441
fix: conventional hook not running
AsadJeewa Feb 7, 2022
6e367ae
feat: Updated default max queue size.
KaleabTessera Feb 7, 2022
1154dfe
Merge branch 'develop' into feature/ppo_multiple_train_steps
KaleabTessera Feb 7, 2022
b77f08c
fix: examples README
jcformanek Feb 7, 2022
9db9baf
fix: evaluator interval 2 -> 2000 on SMAC
jcformanek Feb 7, 2022
1253a4e
Merge branch 'develop' into fix/conventional-commit-pre-commit-hook
KaleabTessera Feb 7, 2022
cb6b4f9
Merge pull request #395 from instadeepai/fix/conventional-commit-pre-…
AsadJeewa Feb 7, 2022
d85af37
Merge branch 'develop' into fix/checklist-for-issue-templates
arnupretorius Feb 7, 2022
16af1f7
feat: Better default params for mappo.
KaleabTessera Feb 7, 2022
1236828
chore: Updated default seq period and seq length.
KaleabTessera Feb 7, 2022
424f93c
chore: Updated mappo sisl example.
KaleabTessera Feb 7, 2022
908c758
chore: Updated default seq period.
KaleabTessera Feb 7, 2022
e3991c7
Fixed import issues in env_preprocess_wrappers
RuanJohn Feb 8, 2022
16e76cf
Merge branch 'fix/madqn' of https://github.com/instadeepai/Mava into …
RuanJohn Feb 8, 2022
07418de
Merge pull request #388 from instadeepai/fix/checklist-for-issue-temp…
mmorris44 Feb 8, 2022
b8bf215
feat: internal issue tempalte for tests
arnupretorius Feb 8, 2022
702a834
Merge branch 'develop' into feature/internal-test-issue-template
arnupretorius Feb 8, 2022
6a49c41
fix: make planned test issue
arnupretorius Feb 9, 2022
71ff27c
fix: add test questions to consolidate feature issue
arnupretorius Feb 9, 2022
279d657
Merge branch 'develop' of https://github.com/instadeepai/Mava into fe…
arnupretorius Feb 9, 2022
f08c332
Merge branch 'feature/internal-test-issue-template' of https://github…
arnupretorius Feb 9, 2022
d240413
Merge pull request #399 from instadeepai/feature/internal-test-issue-…
arnupretorius Feb 9, 2022
fdc7cc7
chore: add optional benchmark questions to feature
arnupretorius Feb 9, 2022
c9d8a0e
fix: EpsilonTimestepSchedulers in scaling MADQN
jcformanek Feb 9, 2022
ce614b8
fix: lower evaluator interval
jcformanek Feb 9, 2022
87dc35f
feat: Updated default networks for discrete ppo.
KaleabTessera Feb 9, 2022
11e1f65
chore: Used defined var.
KaleabTessera Feb 9, 2022
59d7981
Merge branch 'develop' into feature/ppo_multiple_train_steps
DriesSmit Feb 10, 2022
d027483
Merge pull request #401 from instadeepai/maintenance/add-benchmark-qu…
arnupretorius Feb 10, 2022
970c456
feat: Minor corrections to loss calculation.
KaleabTessera Feb 10, 2022
0d7cc76
Merge remote-tracking branch 'origin/feature/ppo_multiple_train_steps…
KaleabTessera Feb 10, 2022
2ecac5d
feat: abstract class for system in jax
arnupretorius Feb 10, 2022
27460a9
style: changed doc string formatting style to remove types
arnupretorius Feb 10, 2022
448ef22
test: almost done with test, did wrong way around though
arnupretorius Feb 10, 2022
cb43bd4
test: done with basic test for abstract system class
arnupretorius Feb 10, 2022
26f849d
feat: done with abstract system class - all tests passing
arnupretorius Feb 10, 2022
786e671
Merge branch 'develop' into feature/jax-abstract-system-class
arnupretorius Feb 10, 2022
dc756c9
fix: remove incomplete class test
arnupretorius Feb 10, 2022
d615ef5
chore: pull latest updates
arnupretorius Feb 10, 2022
62d2483
feat(mappo): Mask actions for discrete policies.
KaleabTessera Feb 10, 2022
f6ef46d
chore(mappo): Consistent masking.
KaleabTessera Feb 10, 2022
8743b29
fix: Fixed action masking.
KaleabTessera Feb 10, 2022
99ebf8b
chore: Added todo.
KaleabTessera Feb 10, 2022
86b118d
fix: Corrected action masking.
KaleabTessera Feb 11, 2022
b220e49
Merge branch 'develop' of github.com:instadeepai/Mava into fix/madqn
jcformanek Feb 11, 2022
b678c48
fix: evaluator interval on SMAC examples should be ever 2000 steps
jcformanek Feb 11, 2022
f28873b
merge: Merge remote-tracking branch 'origin/fix/madqn' into feature/p…
KaleabTessera Feb 11, 2022
9522c6d
Merge pull request #362 from instadeepai/fix/madqn
arnupretorius Feb 11, 2022
f99f068
feat: Faster mappo execution.
KaleabTessera Feb 11, 2022
8b83980
Merge remote-tracking branch 'origin/develop' into feature/ppo_multip…
KaleabTessera Feb 11, 2022
fee28d3
chore: Minor docstring updates.
KaleabTessera Feb 11, 2022
0bef098
chore: Removed hard coding of dist type.
KaleabTessera Feb 11, 2022
044e718
chore: Increased min docstring coverage.
KaleabTessera Feb 11, 2022
0babcf2
Fixed archecture_type typo in network.py files
RuanJohn Feb 16, 2022
28beb4b
chore: added missing docstrings
RuanJohn Feb 16, 2022
a1fa5ea
fix: fixed archecture_type typo in system tests
RuanJohn Feb 16, 2022
d8eb254
chore: typo fix in madqn system test
RuanJohn Feb 16, 2022
0470b61
chore: Minor updates for PR.
KaleabTessera Feb 16, 2022
ead4a09
fix: Removed invalid comment.
KaleabTessera Feb 16, 2022
e1c49fd
fix: Made flatland and smac wrapper imports independent.
KaleabTessera Feb 16, 2022
e28f174
feat: Made action masking categorical policies a utility function.
KaleabTessera Feb 16, 2022
e9d3a51
style: separate out distribute from launch in systems
arnupretorius Feb 16, 2022
8a7010f
chore: Removed types from docstrings.
KaleabTessera Feb 16, 2022
b495496
chore: Removed types from docstrings in mappo trainer.
KaleabTessera Feb 16, 2022
8f1cb62
chore: Remove unimplemented value clipping.
KaleabTessera Feb 16, 2022
33fc6fc
chore: Updated single optim update to be more explicit.
KaleabTessera Feb 16, 2022
89c0891
chore: Fixed supersuit import issue.
KaleabTessera Feb 16, 2022
017a973
chore: Fixed mypy typing.
KaleabTessera Feb 16, 2022
2a70e79
fix: Made flatland and smac wrapper imports independent.
KaleabTessera Feb 16, 2022
0cdb16a
Merge pull request #410 from instadeepai/fix/architecture-typo-fix
RuanJohn Feb 16, 2022
965b7e5
Merge branch 'develop' into fix/smac-wrapper-relies-on-flatland
KaleabTessera Feb 16, 2022
7f92517
Merge pull request #413 from instadeepai/fix/smac-wrapper-relies-on-f…
KaleabTessera Feb 16, 2022
cc86102
Merge branch 'develop' into feature/ppo_multiple_train_steps
KaleabTessera Feb 16, 2022
2ef02cf
feat: utils for flattening dicts to use for building configs
arnupretorius Feb 17, 2022
0c668c5
test: basic set of tests for Mava config class
arnupretorius Feb 17, 2022
ca6b065
feat: config class for mava systems
arnupretorius Feb 17, 2022
9e992fe
test: all test done
arnupretorius Feb 17, 2022
365d3e4
docs: finish docstring for config class
arnupretorius Feb 17, 2022
f5217bf
test: added a test to check get before build
arnupretorius Feb 17, 2022
4675b07
docs: minor updates to doc strings
arnupretorius Feb 17, 2022
e930e65
refactor: move examples into tf folder and update examples links
arnupretorius Feb 17, 2022
9a86190
fix: correct order of directories
arnupretorius Feb 17, 2022
82d584f
refactor: move quick start notebook
arnupretorius Feb 17, 2022
511bc5f
Merge pull request #416 from instadeepai/maintenance/move-tf-examples
arnupretorius Feb 17, 2022
0cd724a
fix: readd quickstart notebook
arnupretorius Feb 17, 2022
e00724a
Merge pull request #417 from instadeepai/fix/add-quick-start-notebook
arnupretorius Feb 17, 2022
2b305a1
chore: add reminder to use mava config for tests
arnupretorius Feb 17, 2022
10ae662
feat: simplify abstract class
arnupretorius Feb 17, 2022
f6389cc
chore: change update to set
arnupretorius Feb 17, 2022
b530b97
chore: change update to set
arnupretorius Feb 17, 2022
77b3a9a
fix: change get to set
arnupretorius Feb 17, 2022
798a960
feat: add update function to config
arnupretorius Feb 17, 2022
36a6e03
test: for update method in config class
arnupretorius Feb 17, 2022
63ec835
fix: separate building and built config
arnupretorius Feb 18, 2022
3a4e271
fix: remove config input to launcher
arnupretorius Feb 18, 2022
16ca2db
style: update abstract to include system design method
arnupretorius Feb 21, 2022
12c8f8e
feat: add configure method to abstract class for setting hyperparameters
arnupretorius Feb 21, 2022
4c3000e
Merge branch 'develop' into feature/jax-mava-custom-config-class
arnupretorius Feb 21, 2022
2f9d256
fix: Pin version of gym to 0.21.0 for breaking tests.
KaleabTessera Feb 21, 2022
e851823
fix: Use latest gym, change random seed causing no action.
KaleabTessera Feb 21, 2022
548be59
Merge pull request #421 from instadeepai/fix/gym-version-test-bug
KaleabTessera Feb 21, 2022
7f5eb5e
Merge branch 'develop' into feature/jax-abstract-system-class
KaleabTessera Feb 21, 2022
24ac6c4
Merge branch 'develop' into feature/jax-mava-custom-config-class
KaleabTessera Feb 21, 2022
348c9f0
remove redundant value_network code
AsadJeewa Feb 22, 2022
5abcfc7
Merge branch 'develop' into maintenance/refactor_systems
DriesSmit Feb 22, 2022
4169bd7
Merge pull request #423 from instadeepai/maintenance/refactor_systems
AsadJeewa Feb 22, 2022
20f3d53
Merge branch 'develop' into feature/jax-abstract-system-class
arnupretorius Feb 23, 2022
6d5c478
fix: small bug in the pettingzoo wrapper related to legal action masking
jcformanek Feb 24, 2022
aef5e2b
fix: missing select_action method in madqn executor breaks tick tack …
jcformanek Feb 24, 2022
1f04771
fix: sync code with branches upstream
arnupretorius Feb 24, 2022
71641f2
chore: merge with remote branch
arnupretorius Feb 24, 2022
751d6f2
chore: change local to single process for better clarity
arnupretorius Feb 24, 2022
761a6a6
chore: Merge remote-tracking branch 'origin/develop' into feature/ppo…
KaleabTessera Feb 24, 2022
9187ed8
chore: Check docstrings in examples.
KaleabTessera Feb 24, 2022
5d4c69c
test: add addiontal assert to verify update
arnupretorius Feb 24, 2022
f43f29b
fix: add additional check for building config
arnupretorius Feb 24, 2022
8fad786
fix: remove unneeded pass in config utils
arnupretorius Feb 24, 2022
7263b29
chore: merge with dev
arnupretorius Feb 24, 2022
fbe7ef9
fix: give config set a more descriptive name
arnupretorius Feb 24, 2022
1e21726
Merge pull request #432 from instadeepai/fix/example-madqn-on-pong
arnupretorius Feb 24, 2022
9095b41
Merge branch 'develop' into feature/ppo_multiple_train_steps
DriesSmit Feb 24, 2022
189b171
chore: Made single optim the only option for mappo.
KaleabTessera Feb 24, 2022
fb1b983
Merge remote-tracking branch 'origin/feature/ppo_multiple_train_steps…
KaleabTessera Feb 24, 2022
23a6bd4
fix: Add default param for total_losses.
KaleabTessera Feb 24, 2022
968b43f
Merge branch 'develop' into feature/jax-abstract-system-class
arnupretorius Feb 24, 2022
bc2d422
Added test for flatten_dict
RuanJohn Feb 24, 2022
87d5eb0
fix: Fix docs build.
KaleabTessera Feb 24, 2022
c49ca37
fix: Fix gym version issue with flatland container.
KaleabTessera Feb 24, 2022
2434416
Removed testing class and added pytest fixture
RuanJohn Feb 24, 2022
bc053dc
test: all abstract function overwritten
arnupretorius Feb 24, 2022
2a644b0
chore: merge with remote
arnupretorius Feb 24, 2022
6765521
fix: Updated flatland check.
KaleabTessera Feb 24, 2022
96b875b
fix: Remove pinned gym version.
KaleabTessera Feb 24, 2022
ab596fb
chore: remove unneeded test
arnupretorius Feb 25, 2022
be82a86
fix: remove unused component constant
arnupretorius Feb 25, 2022
0eb7271
Merge pull request #437 from instadeepai/bugfix/flatland-docker-conta…
KaleabTessera Feb 25, 2022
3f40508
Merge branch 'develop' into feature/jax-abstract-system-class
arnupretorius Feb 25, 2022
e0a75e0
Merge branch 'develop' into feature/ppo_multiple_train_steps
DriesSmit Feb 25, 2022
78756f5
Merge pull request #405 from instadeepai/feature/jax-abstract-system-…
arnupretorius Feb 25, 2022
18bef92
Merge branch 'develop' into feature/ppo_multiple_train_steps
KaleabTessera Feb 25, 2022
cd7d7ff
Merge branch 'develop' into fix/docs-building
KaleabTessera Feb 25, 2022
e082fe3
Merge pull request #353 from instadeepai/feature/ppo_multiple_train_s…
KaleabTessera Feb 25, 2022
6b19e0c
Merge branch 'develop' into fix/docs-building
KaleabTessera Feb 25, 2022
901a26c
feat: Release new mava version.
KaleabTessera Feb 25, 2022
0f93ddc
Merge pull request #435 from instadeepai/fix/docs-building
KaleabTessera Feb 25, 2022
6c1febc
Merge branch 'develop' into feature/jax-mava-custom-config-class
arnupretorius Feb 25, 2022
1e33d76
Merge pull request #414 from instadeepai/feature/jax-mava-custom-conf…
arnupretorius Feb 25, 2022
ac2eaf4
Merge branch 'develop' into release/mava-release
KaleabTessera Feb 25, 2022
2c8f7f5
Merge pull request #438 from instadeepai/release/mava-release
KaleabTessera Feb 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Flatland wrapper import error.
  • Loading branch information
jcformanek committed Jan 27, 2022
commit 30661d1c9606382f9202501d964a35dc706bebfc
16 changes: 8 additions & 8 deletions mava/wrappers/flatland.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@
import numpy as np
from acme import specs
from acme.wrappers.gym_wrapper import _convert_to_spec

try:
from flatland.envs.observations import GlobalObsForRailEnv, Node, TreeObsForRailEnv
from flatland.envs.rail_env import RailEnv
from flatland.envs.step_utils.states import TrainState
from flatland.utils.rendertools import AgentRenderVariant, RenderTool
except ModuleNotFoundError:
pass
from flatland.envs.observations import GlobalObsForRailEnv, Node, TreeObsForRailEnv
from flatland.envs.rail_env import RailEnv
from flatland.envs.step_utils.states import TrainState
from flatland.utils.rendertools import AgentRenderVariant, RenderTool
from gym.spaces import Discrete
from gym.spaces.box import Box

Expand All @@ -46,6 +42,7 @@

class FlatlandEnvWrapper(ParallelEnvWrapper):
"""Environment wrapper for Flatland environments.

All environments would require an observation preprocessor, except for
'GlobalObsForRailEnv'. This is because flatland gives users the
flexibility of designing custom observation builders. 'TreeObsForRailEnv'
Expand Down Expand Up @@ -460,6 +457,7 @@ def get_agent_handle(id: str) -> int:

def decorate_step_method(env: RailEnv) -> None:
"""Step method decorator.

Enable the step method of the env to take action dictionaries where agent keys
are the agent ids. Flatland uses the agent handles as keys instead. This function
decorates the step method so that it accepts an action dict where the keys are the
Expand All @@ -485,6 +483,7 @@ def _step(

def max_lt(seq: Sequence, val: Any) -> Any:
"""Get max in sequence.

Return greatest item in seq for which item < val applies.
None is returned if seq was empty or all items in seq were >= val.
"""
Expand All @@ -499,6 +498,7 @@ def max_lt(seq: Sequence, val: Any) -> Any:

def min_gt(seq: Sequence, val: Any) -> Any:
"""Gets min in a sequence.

Return smallest item in seq for which item > val applies.
None is returned if seq was empty or all items in seq were >= val.
"""
Expand Down