Skip to content

[WIP] Final migration to configuration version 1: structured and validated configs#3198

Draft
deruyter92 wants to merge 45 commits intomainfrom
feat/structured_configs
Draft

[WIP] Final migration to configuration version 1: structured and validated configs#3198
deruyter92 wants to merge 45 commits intomainfrom
feat/structured_configs

Conversation

@deruyter92
Copy link
Collaborator

This PR aims to implement the features proposed in #3193, and will be the final PR for merging all changes from the feature branch, implemented in the smaller PRs #3190, #3191, #3194, etc..

[A more elaborate description will added]

deruyter92 and others added 18 commits January 29, 2026 14:01
…onverter_config.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- reading breaks for corrupted yaml
- added tests for prefered behavior that is currently not implemented (yaml safeloading and validating config keys)
Part 1. of migration to typed configs, see issue #3193
This mixin provides methods for:
    - Loading configurations from dictionaries or YAML files
    - Validating configuration data against pydantic models
    - Converting configurations to dictionaries
    - Pretty printing configuration data

add imports from utils
- Introduced new configuration classes for inference, logging, model, pose, project, runner, and training settings.
- Refactored data loading mechanisms to utilize new configuration structures.
- Moved the multithreading and compilation options in inference configuration to the config module.
- Typed configuration for logging.
- Updated dataset loaders to accept model configurations directly or via file paths.
(The fields are kept identical to old multianimal project configs for now)

move ProjectConfig to deeplabcut/core/config
The return value should be the dictionary, not the instantiated transforms
Part 2. of migration to typed configs, see issue #3193
@deruyter92 deruyter92 added this to the Structured configs milestone Feb 4, 2026
@deruyter92 deruyter92 force-pushed the feat/structured_configs branch 4 times, most recently from 2d3ef49 to b5f2fdc Compare February 4, 2026 10:52
@deruyter92 deruyter92 force-pushed the feat/structured_configs branch from b5f2fdc to fdfec16 Compare February 4, 2026 11:04
deruyter92 and others added 22 commits February 5, 2026 16:26
The head_cfg (a part of PoseConfig) was used for dumping modules. This is not supported for typed configs.

The container is now replaced with a plain dict type instead of config.
Part 3. of migration to typed configs, see issue #3193
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