You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Issue will act as a placeholder to summarize the work in progress for migrating from plain dictionaries to typed and validated configuration classes. Originally this idea was formulated in #3172, but to facilitate easier review and a smooth migration the progress will be spilt into some intermediate steps with separate PRs. The old configuration system will stay in place during the intermediate steps and a versioning system will be put in place to facilitate long-term backwards compatibility across config versions.
Procedure
The migration will consist of small PRs subsequent changes, which can be reviewed separately, before merging into a feature branch.
Work in progress / roadmap
(ticking after review and merging into the feature branch)
Centralize project configuration logic
Improve testing to capture existing behavior
New config_mixin for easy moving between types (yaml file <> dict <> dataclass <> DictConfig)
Add typed configs for project config, pytorch config, etc. with pydantic validation
Add typed 3D Project Configs (and tensorflow ?)
Replace dictionary configs with identical DictConfig version (smooth transition)
Add versioning system for migration between old and new configs
Soklaski, R., Goodwin, J., Brown, O., Yee, M. and Matterer, J., 2022. Tools and practices for responsible AI engineering. arXiv preprint arXiv:2201.05647.
Future Work
Currently default model definitions are still stored as yaml files in the package. Moving to LazyConfig as in Detectron 2 would improve things significantly.
I think we need to make sure that everytime a model is used, all the changes to the project's config.yaml are reflected in the model's configuration under metadata as well.
There might be a better way to handle things in deeplabcut/pose_estimation_pytorch/data/base.py.
Migrating to typed and validated configurations
This Issue will act as a placeholder to summarize the work in progress for migrating from plain dictionaries to typed and validated configuration classes. Originally this idea was formulated in #3172, but to facilitate easier review and a smooth migration the progress will be spilt into some intermediate steps with separate PRs. The old configuration system will stay in place during the intermediate steps and a versioning system will be put in place to facilitate long-term backwards compatibility across config versions.
Procedure
The migration will consist of small PRs subsequent changes, which can be reviewed separately, before merging into a feature branch.
Work in progress / roadmap
(ticking after review and merging into the feature branch)
read_configin favor of typed ProjectConfig)deeplabcut/pose_estimation_pytorch/data/base.py(mismatching init, mixed project/pose logic)Related PRs
...
[WIP] Final migration to configuration version 1: structured and validated configs #3198
Motivation
As formulated by @arashsm79 in #3172
Summary
Why Typed & Structured Configuration (OmegaConf + Pydantic)
Strong guarantees for correctness
Static typing improves developer velocity
Hierarchical, composable configuration
Cleaner overrides and defaults.
Structured configs make it easier to define parameter ranges for tuning and automation.
Config schemas can be versioned and evolve safely over time while preserving backward compatibility.
Full, validated configuration can be saved alongside results, which improves reproducibility and transparency.
Builds on well-maintained, widely adopted libraries (OmegaConf, Pydantic).
Resources for knowing more about structured configs:
Future Work
More things that could be done ( @deruyter92 ):
config.yamlare reflected in the model's configuration undermetadataas well.deeplabcut/pose_estimation_pytorch/data/base.py.