← 输入框|github.com|刷新
Skip to content

Move core config to dlccore - #3605

Draft
C-Achard wants to merge 9 commits into
devfrom
cy/config-from-dlccore
Draft

C-Achard wants to merge 9 commits into
devfrom
cy/config-from-dlccore

Conversation

@C-Achard

@C-Achard C-Achard commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Scope

Replaces DeepLabCut's config core (base_config, project_config, validation, versioning, the generic YAML helpers and DLCDeprecationWarning) with the same code from dlccore 0.0.1, now a dependency. DeepLabCut-specific helpers (templates, read_config, edit_config, 3D config writers, write_project_config) stay in deeplabcut/core/config/utils.py. No change to the config schema or file format.

Main changes

  • The four moved modules are registered in sys.modules under their old deeplabcut.core.config.* paths, as the same module objects, so existing imports keep working and patches through the old paths reach dlccore.
  • DLCDeprecationWarning is dlccore's class, re-exported from deeplabcut.core.deprecation, so warning filters on either name match.
  • The config tests move to dlccore; tests/core/config/test_dlccore_aliases.py covers the old import paths, patching through them, the warning class and the pose migrations.
  • Adds dlccore>=0.0.1,<0.1 and raises the ruamel-yaml floor to >=0.16 to match dlccore.
  • Adds the possibility to register new loggers, and adds dlccore

@C-Achard C-Achard added config Related to config.yaml, ruamel, YAML parsing, ... core-migration Moving DeepLabCut code to dlccore labels Nov 30, 2026
@C-Achard C-Achard self-assigned this Nov 30, 2026
@C-Achard
C-Achard requested review from Ayskin and deruyter92 December 3, 2026 10:34
@deruyter92

Copy link
Copy Markdown
Collaborator

great work @C-Achard!

A few points:

  • I think than in the beginning pinning exactly to 0.0.1 instead of a range would be good, as we are in the middle of the migration. When things stabilize a bit more, probably a range would be nice indeed.
  • We need to think well about the logging (currently the GUI debug report no longer show config messages).
  • With the current implementation dlc.core.config API docs will disappear. I think we can re-introduce them via preload_modules in mkdocs
  • Good scope for the first migration, but I think PoseConfig etc should come along soon as well.

Do you think this first migration PR is a good candidate to include in 3.1 maybe? I think that might be good. The scope is relatively small still, before the labeled data.

@C-Achard

C-Achard commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

I think than in the beginning pinning exactly to 0.0.1 instead of a range would be good, as we are in the middle of the migration. When things stabilize a bit more, probably a range would be nice indeed.

Agreed!

We need to think well about the logging (currently the GUI debug report no longer show config messages).

My bad, fixed now.

With the current implementation dlc.core.config API docs will disappear. I think we can re-introduce them via preload_modules in mkdocs

I will see what the easiest for now, before we decide whether we should move to repo-side docs gathered and rebuilt here.

@C-Achard

C-Achard commented Dec 3, 2026

Copy link
Copy Markdown
Member Author

I think it can go in 3.1 too

@C-Achard C-Achard added the 3.1 label Dec 3, 2026

@C-Achard C-Achard left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

(Will conflict with #3589 as well)

@deruyter92

Copy link
Copy Markdown
Collaborator

(Will conflict with #3589 as well)

Would you prefer me to implement it in dlccore so it lands in 3.1? It is not urgently needed to have the Pydantic model right now. We can also implement it now and add it to the migration PRs.

@C-Achard

C-Achard commented Dec 4, 2026

Copy link
Copy Markdown
Member Author

I feel it might be best to have #3589 in 3.0.4 and migrate all in 3.1?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.1 config Related to config.yaml, ruamel, YAML parsing, ... core-migration Moving DeepLabCut code to dlccore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants