Skip to content

Add proper support for config dispatching #13

@yanovs

Description

@yanovs

Here's an interesting pattern that just works right now:

import dilib


class CarConfig(dilib.Config):
    engine_cfg_a = EngineConfigA()
    engine_cfg_b = EngineConfigB()
    engine_cfg = dilib.Forward(engine_cfg_b)

    engine = dilib.Forward(engine_cfg.engine)

We should:

  • Add unit tests for this
  • Document the pattern in the README
  • It actually almost just works: we need to fix perturbing the engine cfg

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions