-
Notifications
You must be signed in to change notification settings - Fork 857
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
[Bug Report] Non-deterministic training (Isaac-Velocity-Rough-Anymal-C-v0) #275
Comments
What happens if you enable this flag? |
I realized one more change that might affect you: Can you change this to the following and see if that improves things? # set seed for torch and other libraries
return torch_utils.set_seed(seed, torch_deterministic=True) |
Interestingly, calling
Seems like it's an issue with the slicing that only pops up when running in deterministic mode. For reference I am running with |
Hi, Have there been any developments regarding this? Is the issue reproducible on your end @Mayankm96 ? |
As we pushed all the assets to the Nucleus, this MR now adapts all the paths to the assets to make sure they work correctly. Fixes isaac-sim#166 - Bug fix (non-breaking change which fixes an issue) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Seems like the issue of using |
It seems difficult to upgrade the pytorch as the it's shipped with isaac sim 2023.1.1. This is my workaround to avoid the error without upgrading pytorch: change |
As we pushed all the assets to the Nucleus, this MR now adapts all the paths to the assets to make sure they work correctly. Fixes isaac-sim#166 - Bug fix (non-breaking change which fixes an issue) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Maybe you wanna check: #904 |
Describe the bug
The training is non-deterministic even with the same random seed.
Steps to reproduce
If you then rerun the same command and train for some episodes, the following two plots can be seen:
Despite nothing changing in between the two runs and using the same random seed, the resulting plots differ. Similarly, if you run the Flat terrain environment, the same can be observed:
Overall the same trends can be observed (which is good), but there is some stochasticity in each training run which makes hyperparameter and reward tuning problematic.
From my experience Isaac gym also had the same problem (isaac-sim/IsaacGymEnvs#189). Interestingly, in Isaac Gym this was only an issue when training on trimesh terrains, but on plane terrains it was deterministic.
Based on the documentation, this can be somewhat expected (https://isaac-orbit.github.io/orbit/source/refs/issues.html#non-determinism-in-physics-simulation) when randomising physical properties at run-time. However, the rough_env_cfg does not do this to my knowledge - friction and mass are only randomised at startup. In any case, I tested it with both
physics_material
andbase_mass
commented out in theRandomizationCfg
and it was still non-deterministic.Is there something that I'm missing or is it an inherent issue of the GPU-based training?
System Info
Checklist
I have checked that there is no similar issue in the repo (required)
I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
The text was updated successfully, but these errors were encountered: