Skip to content

improve error handling in create_training_dataset#3146

Merged
deruyter92 merged 3 commits intoDeepLabCut:mainfrom
deruyter92:jaap/refactor_code_formatting
Feb 16, 2026
Merged

improve error handling in create_training_dataset#3146
deruyter92 merged 3 commits intoDeepLabCut:mainfrom
deruyter92:jaap/refactor_code_formatting

Conversation

@deruyter92
Copy link
Copy Markdown
Collaborator

@deruyter92 deruyter92 commented Nov 13, 2025

Motivation: user feedback can be improved for invalid / deprecated arguments in create_training_dataset

Changes:

  • Instead of a failing function call to nonexitent code parse_available_models , now a ValueError error is raised for argument superanimal_name , providing the user instructions to the correct usage.
  • Add warning for empty annotated dataset. This addresses silent errors for incorrect bodypart configuration. (labeled data disappears after reindexing)
  • add ValueError for unsupported argument weight_init for tensorflow engine in create_training_dataset

@deruyter92 deruyter92 changed the title Jaap/refactor code formatting Jaap/small_refactors Nov 24, 2025
@deruyter92 deruyter92 marked this pull request as ready for review December 4, 2025 10:27
@deruyter92 deruyter92 force-pushed the jaap/refactor_code_formatting branch from d8cafa5 to 768ec3f Compare January 26, 2026 12:11
- Raise ValueError for `superanimal_name` Instead of a failing function call to nonexitent code `parse_available_models` , now a ValueError error is raised, providing the user instructions to the correct usage.
- Add warning for empty annotated dataset. This addresses silent errors for incorrect bodypart configuration. (labeled data disappears after reindexing)
- add ValueError for unsupported argument `weight_init` for tensorflow engine in `create_training_dataset`.
@deruyter92 deruyter92 force-pushed the jaap/refactor_code_formatting branch from 768ec3f to 846cd16 Compare January 26, 2026 12:14
@deruyter92 deruyter92 changed the title Jaap/small_refactors improve error handling in create_training_dataset Jan 26, 2026
@deruyter92
Copy link
Copy Markdown
Collaborator Author

cleaned this PR and added more informative description

Copy link
Copy Markdown
Collaborator

@C-Achard C-Achard left a comment

Choose a reason for hiding this comment

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

LGTM

@deruyter92 deruyter92 merged commit 676ad99 into DeepLabCut:main Feb 16, 2026
10 checks passed
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