Skip to content

--config should replace config, not merge them #1510

@sophie-xhonneux

Description

@sophie-xhonneux

What happened?

Overriding of configs doesn't work as expected.

When we try to override the default

...
### Example validation and training config for mask token modelling in physical space
validation_config: {"losses": {LossPhysical: {weight: 1.0, loss_fcts: [['mse', 1.0]]},}}
...

with a different validation_config

validation_config:
  losses:
    LossLatentSSLStudentTeacher: { 
      "weight": 1.0,
      "JEPA": {'weight': 5, "loss_extra_args": {}, "out_dim": 2048} }

We get the two configs appended

validation_config:
  losses:
    LossPhysical:
      weight: 1.0
      loss_fcts:
        - ["mse", 1.0]
    LossLatentSSLStudentTeacher:
      weight: 1.0
      JEPA:
        weight: 5
        loss_extra_args: {}
        out_dim: 2048

which is not the intended outcome

What are the steps to reproduce the bug?

No response

Hedgedoc link to logs and more information. This ticket is public, do not attach files directly.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginfraIssues related to infrastructureinfra:configIssues relating to the `common.config` module or the configuration more broadly.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions