Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding ability to override configs #14

Open
yanovs opened this issue Nov 23, 2023 · 0 comments
Open

Consider adding ability to override configs #14

yanovs opened this issue Nov 23, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@yanovs
Copy link
Collaborator

yanovs commented Nov 23, 2023

We should consider adding the ability to override entire configs.

Maybe we should be able to define a new config:

class ModifiedCarConfig(dilib.Config):
    car_config = CarConfig()
    dilib.OverrideConfig(EngineConfig, NewEngineConfig)

Or we should be able to override when getting the config:

config = dilib.get_config(CarConfig, EngineConfig=NewEngineConfig)

Or when in between config and container (when we usually perturb values):

config.override_config(EngineConfig, NewEngineConfig)

Perhaps some cases can be handled by the pattern described in #13, but this would be more general because the user of a config could inject a config independently of the config writer.

@yanovs yanovs added the enhancement New feature or request label Nov 23, 2023
@yanovs yanovs self-assigned this Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant