Skip to content

Commit b60d268

Browse files
authored
Merge pull request #2 from enssow/sorcha/dev/verif-debug
Debugging new changes
2 parents 04483bd + f4934e1 commit b60d268

42 files changed

Lines changed: 2165 additions & 363 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/initiative.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ body:
5050
- label: infrastructure and engineering
5151
- label: evaluation, export and visualization
5252
- label: documentation
53+
- label: performance
5354
validations:
5455
required: true
5556

.github/ISSUE_TEMPLATE/task.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ body:
3131
- label: infrastructure and engineering
3232
- label: evaluation, export and visualization
3333
- label: documentation
34+
- label: performance
3435
validations:
3536
required: true
3637

.github/workflows/issue_set_label.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
"science": "science",
2222
"infrastructure and engineering": "infra",
2323
"evaluation, export and visualization": "eval",
24-
"documentation": "documentation"
24+
"documentation": "documentation",
25+
"performance": "performance"
2526
};
2627
2728
const issue = context.payload.issue;

ci/cscs.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ include:
22
- remote: 'https://gitlab.com/cscs-ci/recipes/-/raw/master/templates/v2/.ci-ext.yml'
33

44
stages:
5-
- test-single
5+
- test
66

77
test_job:
8-
stage: test-single
8+
stage: test
99
extends: .uenv-runner-santis-gh200
1010
image: prgenv-gnu/25.6:v2
1111
script: |
@@ -21,9 +21,12 @@ test_job:
2121
--branch "$PRIVATE_REPO_BRANCH" \
2222
https://oauth2:${PRIVATE_REPO_TOKEN}@gitlab.jsc.fz-juelich.de/esde/WeatherGenerator-private.git
2323
24+
echo "Sync"
2425
./scripts/actions.sh sync
26+
echo "Create links and run tests"
2527
./scripts/actions.sh create-links
26-
./scripts/actions.sh integration-test-single
28+
echo "Run tests"
29+
./scripts/actions.sh integration-test${STAGE_TYPE:-}
2730
variables:
2831
SLURM_JOB_NUM_NODES: 1
2932
WITH_UENV_VIEW: 'modules'
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
# (C) Copyright 2025 WeatherGenerator contributors.
2+
#
3+
# This software is licensed under the terms of the Apache Licence Version 2.0
4+
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5+
#
6+
# In applying this licence, ECMWF does not waive the privileges and immunities
7+
# granted to it by virtue of its status as an intergovernmental organisation
8+
# nor does it submit to any jurisdiction.
9+
10+
embed_orientation: "channels"
11+
embed_unembed_mode: "block"
12+
embed_dropout_rate: 0.1
13+
14+
ae_local_dim_embed: 2048
15+
ae_local_num_blocks: 4
16+
ae_local_num_heads: 16
17+
ae_local_dropout_rate: 0.1
18+
ae_local_with_qk_lnorm: True
19+
20+
ae_local_num_queries: 1
21+
ae_local_queries_per_cell: False
22+
ae_adapter_num_heads: 16
23+
ae_adapter_embed: 128
24+
ae_adapter_with_qk_lnorm: True
25+
ae_adapter_with_residual: True
26+
ae_adapter_dropout_rate: 0.1
27+
28+
ae_global_dim_embed: 2048
29+
ae_global_num_blocks: 4
30+
ae_global_num_heads: 32
31+
ae_global_dropout_rate: 0.1
32+
ae_global_with_qk_lnorm: True
33+
# TODO: switching to < 1 triggers triton-related issues.
34+
# See https://github.com/ecmwf/WeatherGenerator/issues/1050
35+
ae_global_att_dense_rate: 1.0
36+
ae_global_block_factor: 64
37+
ae_global_mlp_hidden_factor: 2
38+
ae_global_trailing_layer_norm: False
39+
40+
ae_aggregation_num_blocks: 8
41+
ae_aggregation_num_heads: 32
42+
ae_aggregation_dropout_rate: 0.1
43+
ae_aggregation_with_qk_lnorm: True
44+
ae_aggregation_att_dense_rate: 1.0
45+
ae_aggregation_block_factor: 64
46+
ae_aggregation_mlp_hidden_factor: 2
47+
48+
decoder_type: PerceiverIOCoordConditioning # Main options PerceiverIOCoordConditioning or Linear
49+
pred_adapter_kv: False
50+
pred_self_attention: True
51+
pred_dyadic_dims: False
52+
pred_mlp_adaln: True
53+
num_class_tokens: 0
54+
num_register_tokens: 0
55+
56+
# number of steps offset applied to first target window; if set to zero and forecast_steps=0 then
57+
# one is training an auto-encoder
58+
fe_num_blocks: 16
59+
fe_num_heads: 16
60+
fe_dropout_rate: 0.1
61+
fe_with_qk_lnorm: True
62+
fe_layer_norm_after_blocks: [7] # Index starts at 0. Thus, [3] adds a LayerNorm after the fourth layer
63+
fe_impute_latent_noise_std: 1e-4
64+
# currently fixed to 1.0 (due to limitations with flex_attention and triton)
65+
forecast_att_dense_rate: 1.0
66+
67+
healpix_level: 5
68+
69+
rope_2D: False
70+
71+
with_mixed_precision: True
72+
with_flash_attention: True
73+
compile_model: False
74+
with_fsdp: True
75+
attention_dtype: bf16
76+
mixed_precision_dtype: bf16
77+
mlp_norm_eps: 1e-5
78+
norm_eps: 1e-4
79+
80+
latent_noise_kl_weight: 0.0 # 1e-5
81+
latent_noise_gamma: 2.0
82+
latent_noise_saturate_encodings: 5
83+
latent_noise_use_additive_noise: False
84+
latent_noise_deterministic_latents: True
85+
86+
freeze_modules: ""
87+
load_chkpt: {}
88+
89+
norm_type: "LayerNorm"
90+
91+
#####################################
92+
93+
streams_directory: "./config/streams/eerie_native/"
94+
streams: ???
95+
96+
# type of zarr_store
97+
zarr_store: "zip" # "zarr" for LocalStore, "zip" for ZipStore
98+
99+
general:
100+
101+
# mutable parameters
102+
istep: 0
103+
rank: ???
104+
world_size: ???
105+
106+
# local_rank,
107+
# with_ddp,
108+
# data_path_*,
109+
# model_path,
110+
# run_path,
111+
# path_shared_
112+
113+
multiprocessing_method: "fork"
114+
115+
desc: ""
116+
run_id: ???
117+
run_history: []
118+
119+
# logging frequency in the training loop (in number of batches)
120+
train_logging:
121+
terminal: 10
122+
metrics: 20
123+
checkpoint: 250
124+
125+
# parameters for data loading
126+
data_loading :
127+
128+
num_workers: 12
129+
rng_seed: ???
130+
repeat_data_in_mini_epoch : False
131+
132+
133+
# config for training
134+
training_config:
135+
136+
# training_mode: "masking", "student_teacher", "latent_loss"
137+
training_mode: ["masking"]
138+
139+
num_mini_epochs: 64
140+
samples_per_mini_epoch: 4096
141+
shuffle: True
142+
143+
start_date: 1950-01-01T00:00
144+
end_date: 2004-12-31T00:00
145+
146+
time_window_step: 24:00:00
147+
time_window_len: 24:00:00
148+
149+
learning_rate_scheduling :
150+
lr_start: 1e-6
151+
lr_max: 5e-5
152+
lr_final_decay: 2e-6
153+
lr_final: 0.0
154+
num_steps_warmup: 256
155+
num_steps_cooldown: 512
156+
policy_warmup: "cosine"
157+
policy_decay: "constant"
158+
policy_cooldown: "linear"
159+
parallel_scaling_policy: "sqrt"
160+
161+
optimizer:
162+
grad_clip: 1.0
163+
weight_decay: 0.1
164+
log_grad_norms: False
165+
adamw :
166+
# parameters are scaled by number of DDP workers
167+
beta1 : 0.98125 # == 0.85 on 2 nodes x 4 gpus
168+
beta2 : 0.9875 # == 0.90 on 2 nodes x 4 gpus
169+
eps : 2e-08
170+
171+
losses : {
172+
"physical": {
173+
type: LossPhysical,
174+
loss_fcts: { "mse": { }, },
175+
},
176+
}
177+
178+
model_input: {
179+
"forecasting" : {
180+
# masking strategy: "random", "healpix", "forecast"
181+
masking_strategy: "forecast",
182+
},
183+
}
184+
185+
forecast :
186+
time_step: 24:00:00
187+
offset: 1
188+
num_steps: 3
189+
policy: "fixed"
190+
191+
192+
# validation config; full validation config is merge of training and validation config
193+
validation_config:
194+
195+
samples_per_mini_epoch: 256
196+
shuffle: False
197+
198+
start_date: 2004-01-01T00:00
199+
end_date: 2009-12-31T00:00
200+
201+
# whether to track the exponential moving average of weights for validation
202+
validate_with_ema:
203+
enabled : True
204+
ema_ramp_up_ratio: 0.09
205+
ema_halflife_in_thousands: 1e-3
206+
207+
# parameters for validation samples that are written to disk
208+
output : {
209+
# number of samples that are written
210+
num_samples: 0,
211+
# write samples in normalized model space
212+
normalized_samples: False,
213+
# output streams to write; default all
214+
streams: null,
215+
}
216+
217+
# run validation before training starts (mainly for model development)
218+
validate_before_training: False
219+
220+
221+
# test config; full test config is merge of validation and test config
222+
# test config is used by default when running inference
223+
224+
# Tags for experiment tracking
225+
# These tags will be logged in MLFlow along with completed runs for train, eval, val
226+
# The tags are free-form, with the following rules:
227+
# - tags should be primitive types (strings, numbers, booleans). NO lists or dictionaries
228+
# - tags should not duplicate existing config entries.
229+
# - try to reuse existing tags where possible. MLFlow does not like having too many unique tags
230+
# - do not use long strings in values (less than 20 characters is a good rule of thumb, we may enforce this in the future)
231+
wgtags:
232+
# The name of the organization of the person running the experiment.
233+
# This may be autofilled in the future. Expected values are lowercase strings
234+
# e.g. "ecmwf", "cmcc", "metnor", "jsc", "escience"
235+
org: null
236+
# The Github issue corresponding to this run (number such as 1234)
237+
# Github issues are the central point when running experiment and contain
238+
# links to hedgedocs, code branches, pull requests etc.
239+
# It is recommended to associate a run with a Github issue.
240+
issue: null
241+
# The name of the experiment. This is a distinctive codename for the experiment campaign being run.
242+
# This is expected to be the primary tag for comparing experiments in MLFlow, along with the
243+
# issue number.
244+
# Expected values are lowercase strings with no spaces, just underscores:
245+
# Examples: "rollout_ablation_grid"
246+
exp: null
247+
# *** Experiment-specific tags ***
248+
# All extra tags (including lists, dictionaries, etc.) are treated
249+
# as strings by mlflow, so treat all extra tags as simple string key: value pairs.
250+
grid: null

config/config_jepa_forecasting_finetuning.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99

1010
# number of steps offset applied to first target window; if set to zero and forecast_steps=0 then
1111
# one is training an auto-encoder
12-
fe_num_blocks: 6
12+
fe_num_blocks: 16
1313
fe_num_heads: 16
1414
fe_dropout_rate: 0.1
1515
fe_with_qk_lnorm: True
16-
fe_layer_norm_after_blocks: [] # Index starts at 0. Thus, [3] adds a LayerNorm after the fourth layer
16+
fe_layer_norm_after_blocks: [7] # Index starts at 0. Thus, [3] adds a LayerNorm after the fourth layer
1717
fe_impute_latent_noise_std: 0.0 # 1e-4
1818
# currently fixed to 1.0 (due to limitations with flex_attention and triton)
1919
forecast_att_dense_rate: 1.0
20-
with_step_conditioning: True # False
2120

2221
healpix_level: 5
2322

@@ -111,9 +110,9 @@ training_config:
111110
learning_rate_scheduling :
112111
lr_start: 1e-6
113112
lr_max: 5e-5
114-
lr_final_decay: 1e-6
113+
lr_final_decay: 2e-6
115114
lr_final: 0.0
116-
num_steps_warmup: 512
115+
num_steps_warmup: 256
117116
num_steps_cooldown: 512
118117
policy_warmup: "cosine"
119118
policy_decay: "constant"
@@ -126,7 +125,7 @@ training_config:
126125
log_grad_norms: False
127126
adamw :
128127
# parameters are scaled by number of DDP workers
129-
beta1 : 0.975
128+
beta1 : 0.98125
130129
beta2 : 0.9875
131130
eps : 2e-08
132131

@@ -160,7 +159,7 @@ training_config:
160159

161160
forecast :
162161
time_step: 06:00:00
163-
num_steps: 2
162+
num_steps: 3
164163
offset: 1
165164
policy: "fixed"
166165

@@ -176,14 +175,14 @@ validation_config:
176175

177176
# whether to track the exponential moving average of weights for validation
178177
validate_with_ema:
179-
enabled : False
178+
enabled : True
180179
ema_ramp_up_ratio: 0.09
181180
ema_halflife_in_thousands: 1e-3
182181

183182
# parameters for validation samples that are written to disk
184183
output : {
185184
# number of samples that are written
186-
num_samples: 8,
185+
num_samples: 0,
187186
# write samples in normalized model space
188187
normalized_samples: False,
189188
# output streams to write; default all

0 commit comments

Comments
 (0)