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

Agent (Player) unwrapped from the _FabricModule does not consider the chosen precision during env interaction #236

Closed
belerico opened this issue Mar 16, 2024 · 0 comments · Fixed by #244
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@belerico
Copy link
Member

Every time, during the environment interaction, the we call agent.module to unwrap the agent from the distributed strategy, we also unwrap the agent from the precision plugin, this means that if we are training an agent with float16 or bfloat16 then the environment interaction happens in float32.

I suggest to wrap every player agent with a _FabricModule, i.e. _FabricModule(agent, precision=fabric.precision) so to unwrap the agent from the strategy but maintaining the precision plugin.

cc @michele-milesi

@belerico belerico added the bug Something isn't working label Mar 16, 2024
@belerico belerico added enhancement New feature or request help wanted Extra attention is needed labels Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant