Fix JaxMARL walkthrough notebook API calls and dependencies, Fixes #154 (and some more)#163
Merged
amacrutherford merged 1 commit intoFLAIROx:mainfrom Dec 19, 2025
Conversation
Fixes critical bugs that prevented the walkthrough notebook from running:
1. Fixed action_space() and observation_space() calls to include agent parameter
- Changed env.action_space().n to env.action_space("agent_0").n
- Changed env.observation_space().shape to env.observation_space("agent_0").shape
2. Added missing dependencies to installation cell
- Added distrax (required for Part 3)
- Added hydra-core (required for Part 3)
3. Fixed info dictionary handling in training loop
- Properly reshape returned_episode_returns and returned_episode metrics
- Replaced jax.tree_map with explicit dictionary construction
These changes allow the notebook to run successfully from start to finish.
Contributor
Author
|
Changes to jaxmarl/tutorials/JaxMARL_Walkthrough.ipynb Cell 2 (installation): Cell 11 (training code): Didn't run before, now it does :) There's some more possible improvements like unused imports but I thought I'd just make it work for starters |
Contributor
Author
|
Fixes #154 (and some more). I don't think the docker fail has anything to do with me changing a few lines in the example notebook |
amacrutherford
approved these changes
Dec 19, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes critical bugs that prevented the walkthrough notebook from running:
Fixed action_space() and observation_space() calls to include agent parameter
Added missing dependencies to installation cell
Fixed info dictionary handling in training loop
These changes allow the notebook to run successfully from start to finish.