Skip to content

[dev] Configs refactor - Config refactors review: suggested tweaks and tests (Review only) #3366

Closed
C-Achard wants to merge 7 commits into
cy/PH-DO-NOT-USE-rebased-config-fullfrom
cy/temp-config-review-tweaks
Closed

[dev] Configs refactor - Config refactors review: suggested tweaks and tests (Review only) #3366
C-Achard wants to merge 7 commits into
cy/PH-DO-NOT-USE-rebased-config-fullfrom
cy/temp-config-review-tweaks

Conversation

@C-Achard

Copy link
Copy Markdown
Collaborator

@deruyter92 Here are some small tweaks and improvements, including potentially interesting edge cases tests currently marked as xfail.

This should be considered part of the ongoing review of #3354 / #3198, so some changes, tests and comments may be complementary.

Caution

This is not meant to be merged as-is, as I had to rebase and run pre-commit on all to get proper comparisons with main. Please cherry-pick fc9a599 to a preferred dev branch of the config refactor instead.

C-Achard added 7 commits June 12, 2026 11:15
Apply a set of small fixes and cleanup changes across multiple modules: fix Path/string handling in weight_init; remove many redundant `pass` stubs in abstract classes and placeholders; adjust loop/range usages (camera calibration, tracklets, DataFrame index); improve legacy-argument handling in Loader (DeprecationWarning with stacklevel, error messages) and infer model config path; reorder and add/remove imports where appropriate; avoid silently swallowing exceptions after printing (materialize, make_labeled_video); use tuple form for startswith check in auxiliary functions; tweak test random.sample range; and other minor formatting/consistency tweaks. These changes are intended to improve correctness, clarity, and maintainability without altering core behavior.
Context: it was trying to run on numpy arrays which pydantic considers an arbitrary type
Introduce tests/core/config/test_config_breakage.py covering pathological cases for the centralized config model. Tests exercise in-place nested mutation validation (xfail), dirty-state isolation between instances, change-note handling and alias-to-canonical mapping, nested YAML comments (xfail), and normalization/serialization of nested models containing Path and Enum values. Uses ProjectConfig, DLCBaseConfig and DLCVersionedConfig to assert expected dirty-tracking, logging, validation, and YAML output behaviors.
@C-Achard C-Achard requested a review from deruyter92 June 12, 2026 19:49
@C-Achard C-Achard self-assigned this Jun 12, 2026
@C-Achard C-Achard added invalid This doesn't seem right WORK IN PROGRESS! developers are currently working on this feature... stay tuned. config Related to config.yaml, ruamel, YAML parsing, ... labels Jun 12, 2026
@C-Achard C-Achard closed this Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Related to config.yaml, ruamel, YAML parsing, ... invalid This doesn't seem right WORK IN PROGRESS! developers are currently working on this feature... stay tuned.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant