Skip to content

[dev] C7 - Configs refactor: finalize and simplify infrastructure #3354

Draft
deruyter92 wants to merge 20 commits into
feat/structured_configsfrom
jaap/C7_config_cleanup_simplify
Draft

[dev] C7 - Configs refactor: finalize and simplify infrastructure #3354
deruyter92 wants to merge 20 commits into
feat/structured_configsfrom
jaap/C7_config_cleanup_simplify

Conversation

@deruyter92
Copy link
Copy Markdown
Collaborator

@deruyter92 deruyter92 commented Jun 1, 2026

This PR is part of the WIP (see #3198) for migrating from dictionary configs to typed & validated configurations (overview is tracked in #3193).

This PR finalizes, cleans and simplifies the infrastructure for structured configs before moving migrating to the structured config (schema V1).

Changes:

  • base_config: settle for Pydantic BaseModel instead of several mixins and Pydantic dataclass.
  • Expand the test coverage
  • Make migration system class-aware (instead of single migration logic for both PoseConfig and ProjectConfig)
  • Remove legacy references to OmegaConfig

@deruyter92 deruyter92 requested a review from C-Achard June 1, 2026 13:49
@deruyter92
Copy link
Copy Markdown
Collaborator Author

@C-Achard, would be very helpful if you could give an intermediate review on the deeplabcut.core.config module and corresponding tests. (diff with main, there are some intermediate states that are irrelevant). Thanks a lot!!

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.

@deruyter92 Here are some first comments, mostly focusing on usability/possible refactor artifacts.

Note that I only reviewed the diff of C7 to the feature branch; happy to review the full version once this is finalized.

Comment thread deeplabcut/core/config/base_config.py
Comment thread deeplabcut/core/weight_init.py Outdated
Comment thread deeplabcut/pose_estimation_pytorch/config/data.py Outdated
Comment thread deeplabcut/core/config/project_config.py
Comment thread deeplabcut/core/config/utils.py
Comment thread deeplabcut/core/config/project_config.py Outdated
Comment thread deeplabcut/core/config/project_config.py Outdated
Comment thread deeplabcut/core/config/project_config.py
Comment thread deeplabcut/core/config/project_config.py Outdated
Comment thread deeplabcut/core/weight_init.py
Copy link
Copy Markdown
Collaborator Author

@deruyter92 deruyter92 left a comment

Choose a reason for hiding this comment

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

Thanks @C-Achard. Addressed all your comments. Let's discuss next week.

I have a few extra adjustments in mind (better hook-up in codebase), but after that it's ready for proper stress-testing.

Comment thread deeplabcut/core/config/base_config.py Outdated
Comment thread deeplabcut/core/config/base_config.py
Comment thread deeplabcut/core/config/base_config.py Outdated
Comment thread deeplabcut/core/config/base_config.py Outdated
Comment thread deeplabcut/core/config/project_config.py Outdated
Comment thread deeplabcut/core/config/utils.py
Comment thread deeplabcut/core/config/versioning.py
Comment thread deeplabcut/core/weight_init.py
Comment thread deeplabcut/core/weight_init.py Outdated
Comment thread deeplabcut/pose_estimation_pytorch/config/data.py Outdated
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