Skip to content

Config validation fails to discover Anemoi library path #570

@phinate

Description

@phinate

What happened?

To discover the defaults for configs supplied by the package, Hydra needs

path=pkg://anemoi.training/config

in searchpath. This isn't picked up when running

anemoi training config validate --config-name=...

An example config is here:

defaults:
  - data: zarr
  - dataloader: native_grid
  - diagnostics: evaluation
  - datamodule: single
  - hardware: example
  - graph: multi_scale
  - model: gnn
  - training: default
  - _self_

config_validation: True

data:
  resolution: o96

hardware:
  num_gpus_per_node: 1
  accelerator: auto
  paths:
    data: https://object-store.os-api.cci1.ecmwf.int/ml-tests/test-data/samples
    output: outputs/ # anything writeable
    graph: outputs/graphs # downloads graph here if absent
  files:
    dataset: anemoi-integration-tests/training/datasets/aifs-ea-an-oper-0001-mars-o96-2017-2017-6h-v8-testing.zarr
    graph: first_graph_o96.pt

dataloader:
  training:
    end: 2017-01-08 12:00:00
  validation:
    start: 2017-01-08 18:00:00

training:
  max_epochs: 1
  lr:
    rate: 1e-3

diagnostics:
  log:
    wandb: { enabled: false, entity: "" }
    mlflow: { enabled: false, tracking_uri: "" }

Running anemoi-training train ... gives

[2025-09-30 14:19:55,592][anemoi.training.train.train][INFO] - Config validated.

as part of the logs. However, running anemoi-training config validate ... gives

hydra.errors.MissingConfigException: In 'simple-config.yaml': Could not find 'training/default'

We can further see the search path does not contain path=pkg://anemoi.training/config:

Config search path:
        provider=anemoi-cwd-searchpath-plugin, path=file:///Users/nsimpson/Code/temp-an
        provider=hydra, path=pkg://hydra.conf
        provider=main, path=file:///Users/nsimpson/Code/temp-an/.venv/lib/python3.12/site-packages/anemoi/training/commands
        provider=schema, path=structured://

Version

feat/azure-mlflow

Platform (OS and architecture)

MacOS 14.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions