Visitar URL original
fix `export_model` dumping unnormalized objects in pickle by deruyter92 · Pull Request #3473 · DeepLabCut/DeepLabCut · GitHub
Skip to content
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
Next Next commit
fix export_model dumping objects in pickle: add normalize=True in…
… `PoseConfig.to_dict(..)`
  • Loading branch information
deruyter92 committed Aug 31, 2026
commit f95cf13eb534eeed4495e8b4cf3644dcbe3d7335
2 changes: 1 addition & 1 deletion deeplabcut/pose_estimation_pytorch/apis/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def export_model(
# Convert typed config to plain dict so torch.save doesn't pickle
# custom types (which require weights_only=False to load)
if isinstance(model_cfg, PoseConfig):
model_cfg = model_cfg.to_dict()
model_cfg = model_cfg.to_dict(normalize=True)

pose_weights = torch.load(snapshot.path, **load_kwargs)["model"]
export_dict = dict(config=model_cfg, pose=pose_weights)
Expand Down