Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
50a11a1
update multiout interpolation
JPXKQX Feb 19, 2026
8094222
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2026
0ebea61
update base interpolator config
JPXKQX Feb 19, 2026
c76d4b7
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Feb 19, 2026
53a15fd
remove interpolator
JPXKQX Feb 19, 2026
3497d38
fix:
JPXKQX Feb 19, 2026
e637493
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 19, 2026
c1ee457
Merge branch 'main' into feat/task-refactor
JPXKQX Feb 20, 2026
e9eaf76
Merge branch 'main' into feat/task-refactor
JPXKQX Feb 24, 2026
a1371ca
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 2, 2026
1904412
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 10, 2026
b541691
pass task to the dataset
JPXKQX Mar 11, 2026
22c0317
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 11, 2026
ccabd0a
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 12, 2026
f07f1da
update
JPXKQX Mar 12, 2026
6044c79
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 12, 2026
e6e2845
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 12, 2026
1fba6a2
Merge branch 'feat/task-refactor' into feat/task-refactor-2
JPXKQX Mar 12, 2026
9b39a53
Merge branch 'feat/task-refactor-2' into feat/task-refactor
JPXKQX Mar 13, 2026
c7f788c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 13, 2026
67fc4f0
update config
JPXKQX Mar 13, 2026
756ee06
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 13, 2026
c7968fd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 13, 2026
851b9f1
fix: relate date indices
JPXKQX Mar 13, 2026
1441a8c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 13, 2026
243edb3
fix: update
JPXKQX Mar 13, 2026
9d046a0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 13, 2026
8b2bae9
update
JPXKQX Mar 16, 2026
a5eebe4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 16, 2026
46d9129
remove
JPXKQX Mar 17, 2026
6f2680c
Apply suggestion from @JPXKQX
JPXKQX Mar 17, 2026
ef6db95
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 17, 2026
0de8452
clean
JPXKQX Mar 17, 2026
7076ff5
metadata
JPXKQX Mar 17, 2026
df6b507
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 17, 2026
2d676de
rename protocol to methods
JPXKQX Mar 17, 2026
014da26
add relative_date_indices to inference metadata
VeraChristina Mar 17, 2026
74a8c8f
rename methods
JPXKQX Mar 17, 2026
5a14805
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 17, 2026
072e849
clean up config files
mc4117 Mar 17, 2026
e098df3
reintroduce scalers
mc4117 Mar 17, 2026
bc08874
rename BaseGraphModule to BaseTrainingModule
JPXKQX Mar 17, 2026
eb091cc
add debug config for ens interpolator
VeraChristina Mar 17, 2026
6997087
remove explicit_times
VeraChristina Mar 17, 2026
a0e8e38
keep inference metadata structure
VeraChristina Mar 19, 2026
252087e
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 19, 2026
d3577b9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 19, 2026
c184d08
Merge branch 'main' into feat/task-refactor
dietervdb-meteo Mar 20, 2026
1949cd7
delete
JPXKQX Mar 20, 2026
edb3665
update interpolator config
mc4117 Mar 20, 2026
987385f
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 23, 2026
7148554
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 23, 2026
3ed149c
update configs
JPXKQX Mar 23, 2026
ffc97a4
new names
JPXKQX Mar 23, 2026
e9d4ee0
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 23, 2026
83ad3fd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 23, 2026
6407299
bump metadata version
JPXKQX Mar 23, 2026
dff7927
comment
JPXKQX Mar 23, 2026
cfe192f
remove timeincrement
JPXKQX Mar 23, 2026
59296b5
rm references to GraphForecaster
mc4117 Mar 23, 2026
faf2ef8
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 23, 2026
49594e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 23, 2026
13be7ec
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 23, 2026
09321cf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 23, 2026
effae06
clean
JPXKQX Mar 23, 2026
7ee6b75
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 23, 2026
3ac4307
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 23, 2026
c69c067
finish rename
mc4117 Mar 23, 2026
4bd427b
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 23, 2026
9ca18c8
rejig base training module
mc4117 Mar 23, 2026
76c89c8
attempt to fix tests
mc4117 Mar 23, 2026
e18adac
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 23, 2026
d5f0958
fix schema and config files
mc4117 Mar 24, 2026
f75ff15
fix merge conflict
mc4117 Mar 24, 2026
738dd2d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
ae2481c
update multistep_input and output references
mc4117 Mar 24, 2026
d898cf0
update names
mc4117 Mar 24, 2026
fe47a90
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 24, 2026
55d878f
Merge branch 'main' into feat/task-refactor
mc4117 Mar 24, 2026
4d53c65
fix interpolator test
mc4117 Mar 24, 2026
21ab123
update aicon yaml
mc4117 Mar 24, 2026
3e369ef
fix indices
mc4117 Mar 24, 2026
1c6519d
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 24, 2026
387f82e
fix variable order test
mc4117 Mar 24, 2026
bf964f4
fix import
mc4117 Mar 24, 2026
ac5b2ba
fix config validation
mc4117 Mar 24, 2026
51c9ed1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
fb8a3da
fix error in autoencoder yaml
mc4117 Mar 24, 2026
d17cde5
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 24, 2026
4936693
rm timestep in test
mc4117 Mar 24, 2026
e821b98
fix tests
mc4117 Mar 24, 2026
8d8212d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
fb23ff9
Fix diffusion tendency task refactor regressions
ssmmnn11 Mar 24, 2026
7e5eb8a
Merge branch 'main' into feat/task-refactor
mc4117 Mar 24, 2026
5c8f37b
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 24, 2026
a33ab32
remove rollout from base configs
JPXKQX Mar 24, 2026
f0d02d7
schema
JPXKQX Mar 24, 2026
6535859
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 24, 2026
925638d
update time interpolation
JPXKQX Mar 24, 2026
502c6a1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
61a46fe
update rollout steps (to support validation_rollout)
JPXKQX Mar 24, 2026
073fb5a
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 24, 2026
963666b
update tests
JPXKQX Mar 24, 2026
f902817
update plot_adapters
JPXKQX Mar 24, 2026
cc6366e
fix: aicon
JPXKQX Mar 24, 2026
281f8bf
rollback changes to adapters
JPXKQX Mar 24, 2026
7b3a681
aicon
JPXKQX Mar 24, 2026
b0d3ec6
rename
JPXKQX Mar 24, 2026
b9ea900
update
JPXKQX Mar 24, 2026
9370cda
update
JPXKQX Mar 24, 2026
69bfb4e
update test
JPXKQX Mar 24, 2026
67b82da
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
68a6ece
update test
JPXKQX Mar 24, 2026
b12f78a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 24, 2026
baefe43
rename model_task to training_method
JPXKQX Mar 25, 2026
58230a2
docs
JPXKQX Mar 25, 2026
028cfd3
fix: multi-dataset
JPXKQX Mar 25, 2026
c6e3a13
update rollout in tests
mc4117 Mar 25, 2026
420e9b9
pre-commit
JPXKQX Mar 25, 2026
929a25b
merge conflict
mc4117 Mar 25, 2026
e284447
fix adapter
JPXKQX Mar 25, 2026
c1eecb5
attempt to fix rollout
mc4117 Mar 25, 2026
961af91
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 25, 2026
53eb3ce
adapt rollout
mc4117 Mar 25, 2026
159d425
more fixes
mc4117 Mar 25, 2026
7de5f31
more fixes
mc4117 Mar 25, 2026
a4403e8
undefined variables
mc4117 Mar 25, 2026
e131e58
merge
JPXKQX Mar 25, 2026
933b3f7
rollout fix
mc4117 Mar 25, 2026
8ee14f3
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Mar 25, 2026
0489449
small fix
mc4117 Mar 25, 2026
7c11149
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 25, 2026
b6a5cac
update output_times
JPXKQX Mar 25, 2026
5cad3d8
remove get_total_targets
JPXKQX Mar 25, 2026
1615787
more adapters
JPXKQX Mar 25, 2026
f9dfb56
set plot adapters
JPXKQX Mar 25, 2026
93ac393
remove diffusion plot adapter
JPXKQX Mar 25, 2026
db8834a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 25, 2026
35f91a7
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Mar 25, 2026
5b57d34
clean diffusion adapter plot
JPXKQX Mar 25, 2026
1c69833
plots working: single & forecasting
JPXKQX Mar 25, 2026
f510815
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 25, 2026
e7a4990
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 26, 2026
c8ee620
Merge branch 'main' into feat/task-refactor
mc4117 Mar 27, 2026
f983cce
update tests
JPXKQX Mar 27, 2026
5a4e795
Merge branch 'main' into feat/task-refactor
ssmmnn11 Mar 28, 2026
ea13e4e
Merge branch 'main' into feat/task-refactor
JPXKQX Mar 31, 2026
9531746
configs
JPXKQX Mar 31, 2026
5f227c0
update output_steps (plots)
JPXKQX Mar 31, 2026
69fa482
update config
JPXKQX Mar 31, 2026
6d1bd05
remove downscaling
JPXKQX Mar 31, 2026
2d29da2
remove downscaling
JPXKQX Mar 31, 2026
ba85f1d
update schema
JPXKQX Mar 31, 2026
50f0591
remove output_steps
JPXKQX Apr 1, 2026
690d771
more cleaning: plots
JPXKQX Apr 1, 2026
6ebc677
pre-commit
JPXKQX Apr 1, 2026
dba4818
delete custom
JPXKQX Apr 1, 2026
8b9b02a
fix plotting (forecasting,autoencoding,temporal_downscaling)
JPXKQX Apr 1, 2026
ab6d5cd
rename to -er
JPXKQX Apr 1, 2026
cd4ca0c
remove
JPXKQX Apr 1, 2026
e0df492
Merge branch 'main' into feat/task-refactor
JPXKQX Apr 2, 2026
0b1c66f
-er class names
JPXKQX Apr 2, 2026
b9a394a
fix: time sharding, trajectories
Magnus-SI Apr 7, 2026
ab406ca
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 7, 2026
04684c0
Merge branch 'main' into feat/task-refactor
mc4117 Apr 8, 2026
9984b13
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
2991b4d
fix failing tests
mc4117 Apr 8, 2026
89dfbc9
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Apr 8, 2026
3a2b20c
continuing to remove reference to interpolation
mc4117 Apr 8, 2026
de67f32
fix: task name
JPXKQX Apr 8, 2026
d30d9ef
rm more references to interpolator
mc4117 Apr 8, 2026
2873e32
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Apr 8, 2026
1ae5a40
update temporal downscaler
JPXKQX Apr 8, 2026
a60fd2c
update plotting test
mc4117 Apr 8, 2026
4f52869
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
040cad6
fix plotting test
mc4117 Apr 8, 2026
6d66673
fix plotting test
mc4117 Apr 8, 2026
27646f9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
82cd252
temporal downscaler plotting
JPXKQX Apr 8, 2026
fca174a
fix
JPXKQX Apr 8, 2026
9bd7936
fix
JPXKQX Apr 8, 2026
422d6f6
rm leftover merge
mc4117 Apr 8, 2026
9633dbf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
97683be
rm leftover merge
mc4117 Apr 8, 2026
f93de26
rm leftover merge
mc4117 Apr 8, 2026
efa395f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 8, 2026
2f71bbb
separate task and method tests
VeraChristina Apr 8, 2026
e77e9fa
consistent naming
mc4117 Apr 8, 2026
e99a557
add data frequency to config
mc4117 Apr 9, 2026
2f2fe09
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Apr 9, 2026
1d40ba6
update schemas
mc4117 Apr 9, 2026
4b0b297
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
e1a2bff
taking account of frequency vs timestep
mc4117 Apr 9, 2026
f3a1b6e
fix merge
mc4117 Apr 9, 2026
f83bdaa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
ecc7a87
update tests
mc4117 Apr 9, 2026
4d85222
changing offset
mc4117 Apr 9, 2026
3676d50
changing offset
mc4117 Apr 9, 2026
773aad0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
43854d7
remove data_frequency
JPXKQX Apr 9, 2026
e6591ae
add rollout tests
VeraChristina Apr 9, 2026
9495d31
consistent naming
mc4117 Apr 9, 2026
bed7641
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Apr 9, 2026
bca3b02
update config
mc4117 Apr 9, 2026
3182af9
update test
mc4117 Apr 9, 2026
be3fb53
fix
JPXKQX Apr 9, 2026
ade6460
style
JPXKQX Apr 9, 2026
79efdef
remove data.timestep
JPXKQX Apr 9, 2026
844abb0
Merge branch 'feat/task-refactor' into fix/task-refactor
JPXKQX Apr 9, 2026
b150fb9
update
JPXKQX Apr 9, 2026
80b789c
update schema: drop timestep
JPXKQX Apr 9, 2026
c840ee9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
489ed64
update debug_ens config
JPXKQX Apr 9, 2026
b290bfd
Merge branch 'main' into feat/task-refactor
JPXKQX Apr 9, 2026
7d1c73b
update config
JPXKQX Apr 9, 2026
b8073fe
create new file for plot adapter tests
JPXKQX Apr 9, 2026
867e8d5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
571b879
fix: update assert
JPXKQX Apr 9, 2026
151423b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
e95b93c
naming
JPXKQX Apr 9, 2026
5782e6b
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Apr 9, 2026
a0bdc5f
improve testing of plot adapters
JPXKQX Apr 9, 2026
40fb835
fix
JPXKQX Apr 9, 2026
0072e42
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 9, 2026
f8da1ef
fix leftver dash
mc4117 Apr 10, 2026
00abd9e
fix merge conflict
mc4117 Apr 10, 2026
0c5648b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
ff5574b
add output type
mc4117 Apr 10, 2026
00e5f31
fix failing test
mc4117 Apr 10, 2026
0d91783
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Apr 10, 2026
342b4b9
fix failing adapter test
mc4117 Apr 10, 2026
f4471dd
fix failing callback tests
mc4117 Apr 10, 2026
671ca86
Apply suggestion from @JPXKQX
JPXKQX Apr 10, 2026
2576924
update docs
mc4117 Apr 10, 2026
22ef239
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
mc4117 Apr 10, 2026
3e81d11
update docs
VeraChristina Apr 10, 2026
38b2c25
update docs diffusion and ens configs
VeraChristina Apr 10, 2026
88db32e
update docs
VeraChristina Apr 10, 2026
86081d7
fix: update plot adapter tests
JPXKQX Apr 10, 2026
adbb671
update tests
JPXKQX Apr 10, 2026
043f78f
move tests to plot adapter
JPXKQX Apr 10, 2026
19bea62
split task tests
JPXKQX Apr 10, 2026
4306ebe
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
f7ff8ed
remove plot_adapter.output_times
JPXKQX Apr 10, 2026
3991e44
update plotting tests
JPXKQX Apr 10, 2026
0667271
fix: import name
JPXKQX Apr 10, 2026
7cfc932
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 10, 2026
6465ca8
update
JPXKQX Apr 10, 2026
b902b87
Merge branch 'feat/task-refactor' of https://github.com/ecmwf/anemoi-…
JPXKQX Apr 10, 2026
0dc4879
add missing import
JPXKQX Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions models/docs/introduction/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ The package currently includes the following model architectures:
base architecture
- **AnemoiEnsModelEncProcDec**: The CRPS-optimized ensemble version
that injects noise in the processor, e.g. AIFS-CRPS
- **AnemoiModelEncProcDecMultiOutInterpolator**: A specialized architecture for
time interpolation

All models support flexible layer kernel configuration, allowing for
customization of linear and normalization layers in different parts of
Expand Down
16 changes: 0 additions & 16 deletions models/docs/modules/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,3 @@ the depth of the hierarchy, enabling efficient handling of data.
:members:
:no-undoc-members:
:show-inheritance:

*************************
Time Interpolator Model
*************************

A specialized architecture for time interpolation tasks.

Key features:

#. Ability to select time indices for forcing and predictions
#. Allows for provision of t0 and t6 and predictions of t1->5

.. autoclass:: anemoi.models.models.interpolator.AnemoiModelEncProcDecMultiOutInterpolator
:members:
:no-undoc-members:
:show-inheritance:
10 changes: 7 additions & 3 deletions models/src/anemoi/models/interface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def __init__(
self,
*,
config: DotDict,
n_step_input: int,
n_step_output: int,
graph_data: HeteroData,
statistics: dict,
data_indices: dict,
Expand All @@ -69,7 +71,8 @@ def __init__(
super().__init__()
self.config = config
self.id = str(uuid.uuid4())
self.n_step_input = self.config.training.multistep_input
self.n_step_input = n_step_input
self.n_step_output = n_step_output
self.graph_data = graph_data
self.statistics = statistics
self.statistics_tendencies = statistics_tendencies
Expand Down Expand Up @@ -141,8 +144,7 @@ def _build_tendency_processors(
return self._build_processor_pair(processors_configs, data_indices, statistics_tendencies)

lead_times = list(statistics_tendencies.get("lead_times") or [])
n_step_output = getattr(self.config.training, "multistep_output", None)
if n_step_output == 1:
if self.n_step_output == 1:
step_stats = statistics_tendencies.get(lead_times[0]) if lead_times else None
stats_for_tendencies = step_stats or statistics_tendencies
return self._build_processor_pair(processors_configs, data_indices, stats_for_tendencies)
Expand Down Expand Up @@ -193,6 +195,8 @@ def _build_model(self) -> None:
data_indices=self.data_indices,
statistics=self.statistics,
graph_data=self.graph_data,
n_step_input=self.n_step_input,
n_step_output=self.n_step_output,
_recursive_=False, # Disables recursive instantiation by Hydra
)

Expand Down
2 changes: 0 additions & 2 deletions models/src/anemoi/models/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from .encoder_processor_decoder import AnemoiModelEncProcDec
from .ens_encoder_processor_decoder import AnemoiEnsModelEncProcDec
from .hierarchical import AnemoiModelEncProcDecHierarchical
from .interpolator import AnemoiModelEncProcDecMultiOutInterpolator

from .autoencoder import AnemoiModelAutoEncoder # isort: skip
from .hierarchical_autoencoder import AnemoiModelHierarchicalAutoEncoder # isort: skip
Expand All @@ -28,5 +27,4 @@
"AnemoiEnsModelEncProcDec",
"AnemoiModelAutoEncoder",
"AnemoiModelHierarchicalAutoEncoder",
"AnemoiModelEncProcDecMultiOutInterpolator",
]
44 changes: 0 additions & 44 deletions models/src/anemoi/models/models/autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,6 @@ def _calculate_target_dim(self, dataset_name: str) -> int:
+ self.node_attributes.attr_ndims[dataset_name]
)

def _assemble_input(self, x, batch_size, grid_shard_shapes=None, model_comm_group=None, dataset_name=None):
assert dataset_name is not None, "dataset_name must be provided when using multiple datasets."
node_attributes_data = self.node_attributes(dataset_name, batch_size=batch_size)
grid_shard_shapes = grid_shard_shapes[dataset_name] if grid_shard_shapes is not None else None
if grid_shard_shapes is not None:
shard_shapes_nodes = get_or_apply_shard_shapes(
node_attributes_data, 0, shard_shapes_dim=grid_shard_shapes, model_comm_group=model_comm_group
)
node_attributes_data = shard_tensor(node_attributes_data, 0, shard_shapes_nodes, model_comm_group)

x_input = x[:, : self.n_step_input, ...]
# normalize and add data positional info (lat/lon)
x_data_latent = torch.cat(
(
einops.rearrange(x_input, "batch time ensemble grid vars -> (batch ensemble grid) (time vars)"),
node_attributes_data,
),
dim=-1, # feature dimension
)
shard_shapes_data = get_or_apply_shard_shapes(
x_data_latent, 0, shard_shapes_dim=grid_shard_shapes, model_comm_group=model_comm_group
)

return x_data_latent, shard_shapes_data

def _assemble_output(self, x_out, batch_size, ensemble_size, dtype, dataset_name=None):
x_out = (
einops.rearrange(
x_out,
"(batch ensemble grid) (time vars) -> batch time ensemble grid vars",
batch=batch_size,
ensemble=ensemble_size,
time=self.n_step_output,
)
.to(dtype=dtype)
.clone()
)
assert dataset_name is not None, "dataset_name must be provided for multi-dataset case"

for bounding in self.boundings[dataset_name]:
# bounding performed in the order specified in the config file
x_out = bounding(x_out)
return x_out

def _assemble_forcings(self, x, batch_size, grid_shard_shapes=None, model_comm_group=None, dataset_name=None):
assert dataset_name is not None, "dataset_name must be provided when using multiple datasets."
node_attributes_target = self.node_attributes(dataset_name, batch_size=batch_size)
Expand Down
6 changes: 4 additions & 2 deletions models/src/anemoi/models/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def __init__(
model_config: DotDict,
data_indices: dict,
statistics: dict,
n_step_input: int,
n_step_output: int,
graph_data: HeteroData,
) -> None:
"""Initializes the graph neural network.
Expand All @@ -59,14 +61,14 @@ def __init__(
self._graph_data = graph_data
self.data_indices = data_indices
self.statistics = statistics
self.n_step_input = n_step_input
self.n_step_output = n_step_output

self.dataset_names = list(data_indices.keys())

model_config = DotDict(model_config)
self._graph_name_hidden = model_config.model.model.hidden_nodes_name

self.n_step_input = model_config.training.multistep_input
self.n_step_output = model_config.training.multistep_output
self.num_channels = model_config.model.num_channels
self.latent_skip = model_config.model.model.latent_skip

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def __init__(
model_config: DotDict,
data_indices: dict,
statistics: dict,
n_step_input: int,
n_step_output: int,
graph_data: HeteroData,
) -> None:

Expand All @@ -62,6 +64,8 @@ def __init__(
data_indices=data_indices,
statistics=statistics,
graph_data=graph_data,
n_step_input=n_step_input,
n_step_output=n_step_output,
)

self.noise_embedder = instantiate(diffusion_config.noise_embedder)
Expand Down Expand Up @@ -756,14 +760,6 @@ def fill_metadata(self, md_dict) -> None:
}
md_dict["metadata_inference"][dataset]["shapes"] = shapes

rel_date_indices = md_dict["metadata_inference"][dataset]["timesteps"]["relative_date_indices_training"]
input_rel_date_indices = rel_date_indices[: self.n_step_input]
output_rel_date_indices = rel_date_indices[-self.n_step_output :]
md_dict["metadata_inference"][dataset]["timesteps"]["input_relative_date_indices"] = input_rel_date_indices
md_dict["metadata_inference"][dataset]["timesteps"][
"output_relative_date_indices"
] = output_rel_date_indices


class AnemoiDiffusionTendModelEncProcDec(AnemoiDiffusionModelEncProcDec):
"""Diffusion model for tendency prediction."""
Expand All @@ -774,6 +770,8 @@ def __init__(
model_config: DotDict,
data_indices: dict,
statistics: dict,
n_step_input: int,
n_step_output: int,
graph_data: HeteroData,
) -> None:
model_config_local = DotDict(model_config)
Expand All @@ -783,6 +781,8 @@ def __init__(
model_config=model_config,
data_indices=data_indices,
statistics=statistics,
n_step_input=n_step_input,
n_step_output=n_step_output,
graph_data=graph_data,
)

Expand Down
8 changes: 0 additions & 8 deletions models/src/anemoi/models/models/encoder_processor_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,3 @@ def fill_metadata(self, md_dict) -> None:
"grid": None, # grid size is dynamic
}
md_dict["metadata_inference"][dataset]["shapes"] = shapes

rel_date_indices = md_dict["metadata_inference"][dataset]["timesteps"]["relative_date_indices_training"]
input_rel_date_indices = rel_date_indices[: self.n_step_input]
output_rel_date_indices = rel_date_indices[-self.n_step_output :]
md_dict["metadata_inference"][dataset]["timesteps"]["input_relative_date_indices"] = input_rel_date_indices
md_dict["metadata_inference"][dataset]["timesteps"][
"output_relative_date_indices"
] = output_rel_date_indices
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ def __init__(
data_indices: dict,
statistics: dict,
graph_data: HeteroData,
n_step_input: int,
n_step_output: int,
) -> None:
self.condition_on_residual = DotDict(model_config).model.condition_on_residual
super().__init__(
model_config=model_config,
data_indices=data_indices,
statistics=statistics,
graph_data=graph_data,
n_step_input=n_step_input,
n_step_output=n_step_output,
)

def _build_networks(self, model_config):
Expand Down
6 changes: 4 additions & 2 deletions models/src/anemoi/models/models/hierarchical_autoencoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def __init__(
data_indices: dict,
statistics: dict,
graph_data: HeteroData,
n_step_input: int,
n_step_output: int,
) -> None:
"""Initializes the graph neural network.

Expand All @@ -55,8 +57,8 @@ def __init__(
model_config = DotDict(model_config)
self._graph_name_hidden = model_config.model.model.hidden_nodes_name

self.n_step_input = model_config.training.multistep_input
self.n_step_output = model_config.training.multistep_output
self.n_step_input = n_step_input
self.n_step_output = n_step_output

self.num_channels = model_config.model.num_channels

Expand Down
Loading
Loading