Skip to content

fix(config): isolate default modality configs - #751

Open
sylvesterkaczmarek wants to merge 2 commits into
NVIDIA:mainfrom
sylvesterkaczmarek:fix/data-config-modality-isolation
Open

sylvesterkaczmarek wants to merge 2 commits into
NVIDIA:mainfrom
sylvesterkaczmarek:fix/data-config-modality-isolation

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary

DataConfig.modality_configs currently shares the module-level MODALITY_CONFIGS object across instances. Config.validate() mutates that tree, so validating one config can corrupt defaults used by later configs in the same process.

This change deep-copies the default modality configuration for each DataConfig.

Tests

Adds a regression test proving nested mutations in one config do not affect another config or the global registry

Signed-off-by: Sylvester Kaczmarek <assistant@SylvesterKaczmarek.com>
Signed-off-by: Sylvester Kaczmarek <assistant@SylvesterKaczmarek.com>
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.

1 participant