Skip to content

Rename interpolator to temporal downscaler#171

Merged
dnerini merged 12 commits into
mainfrom
rename-interpolator-downscaler
Jun 9, 2026
Merged

Rename interpolator to temporal downscaler#171
dnerini merged 12 commits into
mainfrom
rename-interpolator-downscaler

Conversation

@dnerini

@dnerini dnerini commented Jun 6, 2026

Copy link
Copy Markdown
Member

In anemoi, the task formerly called "interpolator" has been officially renamed to "temporal downscaler" (see anemoi training docs). evalml uses the anemoi model type concept throughout its config schema, workflow rules, Python code, and config files. This rename keeps evalml aligned with upstream anemoi terminology.

@frazane frazane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, ready to merge if experiment and showcase both work on the example config!

@MicheleCattaneo MicheleCattaneo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look good to me. I guess it's mostly a refactor of names, correct?
The only main doubt I have is regarding the comment I made for the start/end/step formatting of the forecasting setting.

Comment thread workflow/tools/config.schema.json Outdated
Comment thread workflow/tools/config.schema.json

@jonasbhend jonasbhend left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still get an error when running the temporal-downscaler config:

2026-06-09 08:38:33 INFO GRIB template summary:
2026-06-09 08:38:33 INFO   - SamplesTemplates: FI, PMSL, PS, QV, T, TD_2M, T_2M, U, U_10M, V, V_10M
2026-06-09 08:38:33 INFO Post processor: ExtractMask(lam_0/cutout_mask, points=1147980/slice(np.int64(1147980), None, None))
2026-06-09 08:38:33 INFO Post processor: AssignMask(mask=global/cutout_mask, points=542080/542080, fill_value=nan)
2026-06-09 08:38:35 INFO GRIB template summary:
2026-06-09 08:38:35 INFO   - SamplesTemplates: FI, PMSL, PS, QV, T, TD_2M, T_2M, U, U_10M, V, V_10M
2026-06-09 08:38:36 INFO Temporal downscaling step (2025-03-01 00:00:00): 1 second.
Traceback (most recent call last):
  File "/user-environment/bin/anemoi-inference", line 12, in <module>
    sys.exit(main())
             ^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/__main__.py", line 38, in main
    cli_main(__version__, __doc__, COMMANDS)
  File "/user-environment/lib/python3.12/site-packages/anemoi/utils/cli.py", line 266, in cli_main
    cmd.run(args)
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/commands/run.py", line 60, in run
    runner.execute()
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runners/temporal_downscaler.py", line 166, in execute
    for state_idx, states in enumerate(
                             ^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runner.py", line 232, in run
    yield from self.prepare_output_state(
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runner.py", line 276, in prepare_output_state
    for state in output:
                 ^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runners/temporal_downscaler.py", line 290, in forecast
    y_pred = self.predict_step(self.model, input_tensors_torch)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runner.py", line 379, in predict_step
    return model.predict_step(input_tensors_torch, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/interface/__init__.py", line 241, in predict_step
    return self.model.predict_step(**predict_kwargs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/models/base.py", line 332, in predict_step
    y_hat = self.forward(x, model_comm_group=model_comm_group, grid_shard_shapes=grid_shard_shapes, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/models/interpolator.py", line 187, in forward
    x_data_latent, x_latent = self.encoder[dataset_name](
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 593, in forward
    x_dst = super().forward(
            ^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 483, in forward
    return self.mapper_forward_with_edge_sharding(**kwargs_forward)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 384, in mapper_forward_with_edge_sharding
    out_dst[dst_chunk] = maybe_checkpoint(
                         ^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/utils.py", line 52, in maybe_checkpoint
    return checkpoint(func, *args, **kwargs, use_reentrant=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/_compile.py", line 32, in inner
    return disable_fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py", line 632, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/utils/checkpoint.py", line 496, in checkpoint
    ret = function(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 321, in run_processor_chunk_edge_sharding
    x_src_chunk, x_dst_chunk, _, _ = self.pre_process(
                                     ^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 570, in pre_process
    x_src = self.emb_nodes_src(x_src)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/linear.py", line 125, in forward
    return F.linear(input, self.weight, self.bias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 shapes cannot be multiplied (41092x81 and 158x1024)
srun: error: nid002828: task 0: Exited with exit code 1
srun: Terminating StepId=226333.0

mem_mb_per_cpu: 1800
runtime: "1h"
gpus: 0
account: s83

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this to all configs?

@MicheleCattaneo

Copy link
Copy Markdown
Contributor

I still get an error when running the temporal-downscaler config:

2026-06-09 08:38:33 INFO GRIB template summary:
2026-06-09 08:38:33 INFO   - SamplesTemplates: FI, PMSL, PS, QV, T, TD_2M, T_2M, U, U_10M, V, V_10M
2026-06-09 08:38:33 INFO Post processor: ExtractMask(lam_0/cutout_mask, points=1147980/slice(np.int64(1147980), None, None))
2026-06-09 08:38:33 INFO Post processor: AssignMask(mask=global/cutout_mask, points=542080/542080, fill_value=nan)
2026-06-09 08:38:35 INFO GRIB template summary:
2026-06-09 08:38:35 INFO   - SamplesTemplates: FI, PMSL, PS, QV, T, TD_2M, T_2M, U, U_10M, V, V_10M
2026-06-09 08:38:36 INFO Temporal downscaling step (2025-03-01 00:00:00): 1 second.
Traceback (most recent call last):
  File "/user-environment/bin/anemoi-inference", line 12, in <module>
    sys.exit(main())
             ^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/__main__.py", line 38, in main
    cli_main(__version__, __doc__, COMMANDS)
  File "/user-environment/lib/python3.12/site-packages/anemoi/utils/cli.py", line 266, in cli_main
    cmd.run(args)
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/commands/run.py", line 60, in run
    runner.execute()
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runners/temporal_downscaler.py", line 166, in execute
    for state_idx, states in enumerate(
                             ^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runner.py", line 232, in run
    yield from self.prepare_output_state(
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runner.py", line 276, in prepare_output_state
    for state in output:
                 ^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runners/temporal_downscaler.py", line 290, in forecast
    y_pred = self.predict_step(self.model, input_tensors_torch)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/inference/runner.py", line 379, in predict_step
    return model.predict_step(input_tensors_torch, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/interface/__init__.py", line 241, in predict_step
    return self.model.predict_step(**predict_kwargs, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/models/base.py", line 332, in predict_step
    y_hat = self.forward(x, model_comm_group=model_comm_group, grid_shard_shapes=grid_shard_shapes, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/models/interpolator.py", line 187, in forward
    x_data_latent, x_latent = self.encoder[dataset_name](
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 593, in forward
    x_dst = super().forward(
            ^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 483, in forward
    return self.mapper_forward_with_edge_sharding(**kwargs_forward)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 384, in mapper_forward_with_edge_sharding
    out_dst[dst_chunk] = maybe_checkpoint(
                         ^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/utils.py", line 52, in maybe_checkpoint
    return checkpoint(func, *args, **kwargs, use_reentrant=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/_compile.py", line 32, in inner
    return disable_fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/_dynamo/eval_frame.py", line 632, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/utils/checkpoint.py", line 496, in checkpoint
    ret = function(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 321, in run_processor_chunk_edge_sharding
    x_src_chunk, x_dst_chunk, _, _ = self.pre_process(
                                     ^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/anemoi/models/layers/mapper.py", line 570, in pre_process
    x_src = self.emb_nodes_src(x_src)
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/user-environment/lib/python3.12/site-packages/torch/nn/modules/linear.py", line 125, in forward
    return F.linear(input, self.weight, self.bias)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: mat1 and mat2 shapes cannot be multiplied (41092x81 and 158x1024)
srun: error: nid002828: task 0: Exited with exit code 1
srun: Terminating StepId=226333.0

This issue comes from the checkpoint being trained with a wrong default value from anemoi training.
multistep_in used to be 1 by default and was not used by anemoi training, only by inference. It should be set to 2, which was done for another checkpoint, with runid f9279244ed6f4c458597bdcf335ab36f. This value is both in the metadata and a field in the model's object (questionable design).
@hlasco did manually fix this checkpoint (eb534e4c9ca5408e8b83ace2f268bb29), if I recall correctly. Do you still have it?

@dnerini

dnerini commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

@jonasbhend @MicheleCattaneo thanks, I reverted back to the previous checkpoint see 039a9da

@dnerini dnerini merged commit 0c2ee3b into main Jun 9, 2026
4 checks passed
@dnerini dnerini deleted the rename-interpolator-downscaler branch June 9, 2026 08:22
jonasbhend pushed a commit that referenced this pull request Jun 9, 2026
In anemoi, the task formerly called "interpolator" has been officially
renamed to "temporal downscaler" (see [anemoi training
docs](https://anemoi.readthedocs.io/projects/training/en/latest/modules/train.html#available-tasks)).
evalml uses the anemoi model type concept throughout its config schema,
workflow rules, Python code, and config files. This rename keeps evalml
aligned with upstream anemoi terminology.
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.

4 participants