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

Legacy pickled models support #162

Merged
merged 5 commits into from
Jan 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Pickling backwards compatability fix
  • Loading branch information
KSGulin committed Jan 30, 2023
commit 85d9326af8e9b8bf778ed10b314a3d34a0458e39
1 change: 0 additions & 1 deletion utils/neuralmagic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
# pickled, pruned models.
import models
from models import common
from utils.neuralmagic.quantization import _Add
setattr(common, "_Add", _Add) # Definition of the _Add module has moved

Choose a reason for hiding this comment

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

Hah I love this

Copy link
Author

Choose a reason for hiding this comment

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

Was hoping to import it directly in common.py, but quickly found myself in circular import hell. This way is probably more intentional anyway


# If using yolov5 as a repo and not a package, allow loading of models pickled w package
Expand Down