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 serialization of ListConfig in checkpoint state dictionary #1534

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

BloodAxe
Copy link
Contributor

When creating Processing instances some arguments may be not Tuple but ListConfig (Coming from transforms) and then they silently serialized to state dict with pickle. By adding explicit casting to primitive tuple type we fix that.
The problem with ListConfig in state dict is when unpickled, it forces import of super_gradients.

E.g torch.load(yolo nas checkpoint) line would import SG, create logger and all that unexpected stuff.

…t ListConfig and silently serialized to state dict with pickle. By adding explicit casting to primitive tuple type we fix that
Copy link
Contributor

@shaydeci shaydeci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BloodAxe BloodAxe merged commit c74b034 into master Oct 16, 2023
3 checks passed
@BloodAxe BloodAxe deleted the feature/SG-1184-fix-omegaconf-in-processing branch October 16, 2023 16:04
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.

None yet

2 participants