Skip to content

Fix ReAgent Optimizer wrapper#465

Closed
gji1 wants to merge 1 commit intofacebookresearch:masterfrom
gji1:export-D28205046
Closed

Fix ReAgent Optimizer wrapper#465
gji1 wants to merge 1 commit intofacebookresearch:masterfrom
gji1:export-D28205046

Conversation

@gji1
Copy link
Copy Markdown
Contributor

@gji1 gji1 commented May 4, 2021

Summary: A recent change in PyTorch Lightning set the states of optimizers (https://fburl.com/code/5tpf2i0j), which contradicts the frozen dataclass we had for the Optimizer wrapper in ReAgent. This diff removes the frozen settings, and replaces __getattr__ with the safer, more explicit property functions.

Differential Revision: D28205046

@facebook-github-bot
Copy link
Copy Markdown

This pull request was exported from Phabricator. Differential Revision: D28205046

Summary:
Pull Request resolved: facebookresearch#465

A recent change in PyTorch Lightning set the states of optimizers (https://fburl.com/code/5tpf2i0j), which contradicts the frozen dataclass we had for the Optimizer wrapper in ReAgent. This diff removes the frozen settings, and replaces `__getattr__` with the safer, more explicit property functions.

Differential Revision: D28205046

fbshipit-source-id: 2f2ee8bd0c2dc41ebd93f9f863fcf722441ec2ff
@gji1 gji1 force-pushed the export-D28205046 branch from c2dc947 to 1948912 Compare May 5, 2021 01:52
@facebook-github-bot
Copy link
Copy Markdown

This pull request was exported from Phabricator. Differential Revision: D28205046

@facebook-github-bot
Copy link
Copy Markdown

This pull request has been merged in 1da971b.

xuruiyang pushed a commit that referenced this pull request Sep 20, 2025
Summary:
Pull Request resolved: #465

A recent change in PyTorch Lightning set the states of optimizers (https://fburl.com/code/5tpf2i0j), which contradicts the frozen dataclass we had for the Optimizer wrapper in ReAgent. This diff removes the frozen settings, and replaces `__getattr__` with the safer, more explicit property functions.

Reviewed By: MisterTea

Differential Revision: D28205046

fbshipit-source-id: 848e3a0f90565eb041c0e91ef27c2be9102c5a7d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants