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

Fix flatten_state_dict with empty dictionary #700

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

younik
Copy link
Contributor

@younik younik commented Nov 16, 2024

torch.Tensor.size returns as tensor.Size object when the dimension is not specified, making this check failing:

if state.size == 0:
state = None

@StoneT2000
Copy link
Member

Thanks!

@StoneT2000 StoneT2000 merged commit 33a86c2 into haosulab:main Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants