Skip to content

Fix CondFromModel loading the config path as its snapshot - #3402

Closed
Denny-Hwang wants to merge 1 commit into
DeepLabCut:mainfrom
Denny-Hwang:fix/ctd-snapshot-path
Closed

Fix CondFromModel loading the config path as its snapshot#3402
Denny-Hwang wants to merge 1 commit into
DeepLabCut:mainfrom
Denny-Hwang:fix/ctd-snapshot-path

Conversation

@Denny-Hwang

Copy link
Copy Markdown
Contributor

CondFromModel.init set snapshot_path = Path(config_path), a copy-paste error that overwrote the snapshot path with the config path. When BU conditions were configured the documented way (inference.conditions.config_path + snapshot_path), the model tried to torch.load() the pytorch_config.yaml instead of the .pt snapshot and failed. Use snapshot_path for the snapshot.

CondFromModel.__init__ set snapshot_path = Path(config_path), a
copy-paste error that overwrote the snapshot path with the config
path. When BU conditions were configured the documented way
(inference.conditions.config_path + snapshot_path), the model tried
to torch.load() the pytorch_config.yaml instead of the .pt snapshot
and failed. Use snapshot_path for the snapshot.
@C-Achard C-Achard added the bug fix! fix for a real buggy one... label Jul 15, 2026
@deruyter92

Copy link
Copy Markdown
Collaborator

correct fix, but already addressed in #3387. Closing this in favor of that PR. Thanks for the contribution anyway.

@deruyter92 deruyter92 closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix! fix for a real buggy one...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants