Skip to content

Commit fbec5a4

Browse files
committed
Merge main
2 parents f69a426 + 77bb8fe commit fbec5a4

50 files changed

Lines changed: 1691 additions & 660 deletions

Some content is hidden

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

.github/workflows/benchmarks.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ jobs:
2525
needs: start-aws-runner
2626
runs-on: ${{ fromJSON(needs.start-aws-runner.outputs.instances) }}
2727

28-
env:
29-
# see note about machine image above
30-
CUDA_VERSION: 12.1
3128
steps:
3229
- name: Check out code
3330
uses: actions/checkout@v2

.github/workflows/test-gpu.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
ec2:
1717
uses: Open-Athena/ec2-gha/.github/workflows/runner.yml@v2
1818
with:
19-
ec2_instance_type: g4dn.xlarge
20-
ec2_image_id: ami-00096836009b16a22 # Deep Learning OSS Nvidia Driver AMI GPU PyTorch
19+
ec2_instance_type: g6.xlarge
20+
ec2_image_id: ami-0365bff494b18bf93 # Deep Learning OSS Nvidia Driver AMI GPU PyTorch 2.7 (Ubuntu 22.04) in oa-ci-dev
2121
secrets:
2222
GH_SA_TOKEN: ${{ secrets.GH_SA_TOKEN }}
2323
run-tests:
@@ -36,7 +36,9 @@ jobs:
3636
key: ${{ runner.os }}-test-data-${{ hashFiles('tests/conftest.py', 'configs/*.test.yaml') }}
3737

3838
- name: Install uv and set the python version
39-
uses: astral-sh/setup-uv@v5
39+
uses: astral-sh/setup-uv@v6
40+
with:
41+
enable-cache: true
4042

4143
- name: Set up Python
4244
uses: actions/setup-python@v2

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
key: ${{ runner.os }}-test-data-${{ hashFiles('tests/conftest.py', 'configs/*.test.yaml') }}
3030

3131
- name: Install uv and set the python version
32-
uses: astral-sh/setup-uv@v5
32+
uses: astral-sh/setup-uv@v6
33+
with:
34+
enable-cache: true
3335

3436
- name: Set up Python
3537
uses: actions/setup-python@v2

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,6 @@ scripts/ # Data download and preprocessing
121121
2. **Distributed Training**: Supports multi-GPU via PyTorch DDP
122122
3. **Performance Mindset**: We include profiling tools (memray, py-spy, scalene) and aim to keep the code performant core train and eval loops.
123123
4. **Testing Philosophy**: Tests marked as `manual` or `cuda` for selective execution
124-
5. **Pre-commit Hooks**: Enforces code quality (ruff, mypy, detect-secrets)
125-
6. **Cloud Training**: Supports SkyPilot for remote job execution
124+
5. **Cloud Training**: Supports SkyPilot for remote job execution
125+
6. **Noisy Failure**: Do not swallow errors. If something goes wrong, let it fail loudly.
126+
7. **Avoid Hacks**: Don't accomodate bad designs by adding more cruft -- refactor separately first then make the nice change.

configs/eval_cm4.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,31 @@ experiment:
1717
project: ocean-emulator
1818
entity: ai2cm
1919
group: samudra-inference-2in2out
20-
network: Samudra
2120
prognostic_vars_key: thermo_dynamic_all
2221
boundary_vars_key: tau_hfds
2322

2423
data: !include data/cm4.yaml
2524

26-
samudra:
27-
ch_width: [157, 200, 250, 300, 400]
28-
n_out: 77
29-
dilation: [1, 2, 4, 8]
30-
n_layers: [1, 1, 1, 1]
25+
model:
3126
pred_residuals: false
3227
last_kernel_size: 3
3328
pad: "circular"
3429

35-
core_block:
36-
block_type: "conv_next_block"
37-
kernel_size: 3
38-
activation: "capped_gelu"
39-
upscale_factor: 4
40-
norm: "batch"
30+
unet:
31+
ch_width: [200, 250, 300, 400]
32+
dilation: [1, 2, 4, 8]
33+
n_layers: [1, 1, 1, 1]
34+
35+
core_block:
36+
block_type: "conv_next_block"
37+
kernel_size: 3
38+
activation: "capped_gelu"
39+
upscale_factor: 4
40+
norm: "batch"
41+
42+
down_sampling_block: "avg_pool"
43+
up_sampling_block: "bilinear_upsample"
4144

4245
corrector:
4346
non_negative_corrector_names:
4447
- "so"
45-
46-
down_sampling_block: "avg_pool"
47-
up_sampling_block: "bilinear_upsample"

configs/eval_om4.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disk_mode: true
66
inference_time:
77
start: "2014-10-10"
88
end: "2022-12-24"
9-
num_model_steps_forward: -1
9+
num_model_steps_forward: 25
1010

1111
experiment:
1212
name: local_om4_samudra
@@ -17,27 +17,27 @@ experiment:
1717
project: ocean-emulators
1818
entity: m2lines
1919
group: samudra-eval-om4
20-
network: Samudra
2120
prognostic_vars_key: thermo_dynamic_all
2221
boundary_vars_key: tau_hfds_hfds_anom
2322

2423
data: !include data/public.yaml
2524

26-
samudra:
27-
ch_width: [157, 200, 250, 300, 400]
28-
n_out: 77
29-
dilation: [1, 2, 4, 8]
30-
n_layers: [1, 1, 1, 1]
25+
model:
3126
pred_residuals: false
3227
last_kernel_size: 3
3328
pad: "circular"
3429

35-
core_block:
36-
block_type: "conv_next_block"
37-
kernel_size: 3
38-
activation: "capped_gelu"
39-
upscale_factor: 4
40-
norm: "batch"
30+
unet:
31+
ch_width: [200, 250, 300, 400]
32+
dilation: [1, 2, 4, 8]
33+
n_layers: [1, 1, 1, 1]
4134

42-
down_sampling_block: "avg_pool"
43-
up_sampling_block: "bilinear_upsample"
35+
core_block:
36+
block_type: "conv_next_block"
37+
kernel_size: 3
38+
activation: "capped_gelu"
39+
upscale_factor: 4
40+
norm: "batch"
41+
42+
down_sampling_block: "avg_pool"
43+
up_sampling_block: "bilinear_upsample"

configs/eval_om4_halfdeg.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ disk_mode: true
66
inference_time:
77
start: "2014-10-10"
88
end: "2022-12-24"
9-
num_model_steps_forward: -1
9+
num_model_steps_forward: 25
1010

1111
experiment:
1212
name: local_om4_samudra
@@ -17,32 +17,31 @@ experiment:
1717
project: ocean-emulators
1818
entity: m2lines
1919
group: samudra-eval-om4
20-
network: Samudra
2120
prognostic_vars_key: thermo_dynamic_all
2221
boundary_vars_key: tau_hfds_hfds_anom
2322

2423
data: !include data/public.yaml
2524

26-
samudra:
25+
model:
2726
checkpointing: all
28-
ch_width: [157, 280, 380, 480, 520]
29-
n_out: 154
30-
dilation: [1, 2, 4, 8]
31-
n_layers: [1, 1, 1, 1]
3227
pred_residuals: false
3328
last_kernel_size: 3
3429
pad: "circular"
3530

36-
core_block:
37-
block_type: "conv_next_block"
38-
kernel_size: 3
39-
activation: "capped_gelu"
40-
upscale_factor: 2
41-
norm: "batch"
31+
unet:
32+
ch_width: [280, 380, 480, 520]
33+
dilation: [1, 2, 4, 8]
34+
n_layers: [1, 1, 1, 1]
35+
core_block:
36+
block_type: "conv_next_block"
37+
kernel_size: 3
38+
activation: "capped_gelu"
39+
upscale_factor: 2
40+
norm: "batch"
4241

43-
down_sampling_block: "avg_pool"
44-
up_sampling_block: "bilinear_upsample"
42+
down_sampling_block: "avg_pool"
43+
up_sampling_block: "bilinear_upsample"
4544

4645
corrector:
4746
non_negative_corrector_names: null
48-
ocean_heat_corrector: false
47+
ocean_heat_corrector: false

configs/slurm_perlmutter_train_cm4.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,31 @@ experiment:
5151
project: ocean-emulator
5252
entity: ai2cm
5353
group: samudra-train-2in2out
54-
network: Samudra
5554
prognostic_vars_key: thermo_dynamic_all
5655
boundary_vars_key: tau_hfds
5756

5857
data: !include data/cm4.yaml
5958

60-
samudra:
61-
ch_width: [157, 200, 250, 300, 400]
62-
n_out: 77
63-
dilation: [1, 2, 4, 8]
64-
n_layers: [1, 1, 1, 1]
59+
model:
6560
pred_residuals: false
6661
last_kernel_size: 3
6762
pad: "circular"
6863

69-
core_block:
70-
block_type: "conv_next_block"
71-
kernel_size: 3
72-
activation: "capped_gelu"
73-
upscale_factor: 4
74-
norm: "batch"
64+
unet:
65+
ch_width: [200, 250, 300, 400]
66+
dilation: [1, 2, 4, 8]
67+
n_layers: [1, 1, 1, 1]
68+
69+
core_block:
70+
block_type: "conv_next_block"
71+
kernel_size: 3
72+
activation: "capped_gelu"
73+
upscale_factor: 4
74+
norm: "batch"
75+
76+
down_sampling_block: "avg_pool"
77+
up_sampling_block: "bilinear_upsample"
7578

7679
corrector:
7780
non_negative_corrector_names:
78-
- "so"
79-
80-
down_sampling_block: "avg_pool"
81-
up_sampling_block: "bilinear_upsample"
81+
- "so"

configs/slurm_perlmutter_train_om4.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,30 @@ experiment:
4343
project: ocean-emulators
4444
entity: m2lines
4545
group: samudra-train-om4
46-
network: Samudra
4746
prognostic_vars_key: thermo_all
4847
boundary_vars_key: tau_hfds_hfds_anom
4948

5049
data: !include data/om4_ohc.yaml
5150

52-
samudra:
53-
ch_width: [157, 200, 250, 300, 400]
54-
n_out: 77
55-
dilation: [1, 2, 4, 8]
56-
n_layers: [1, 1, 1, 1]
51+
model:
5752
pred_residuals: false
5853
last_kernel_size: 3
5954
pad: "circular"
6055

61-
core_block:
62-
block_type: "conv_next_block"
63-
kernel_size: 3
64-
activation: "capped_gelu"
65-
upscale_factor: 4
66-
norm: "batch"
56+
unet:
57+
ch_width: [200, 250, 300, 400]
58+
dilation: [1, 2, 4, 8]
59+
n_layers: [1, 1, 1, 1]
6760

68-
down_sampling_block: "avg_pool"
69-
up_sampling_block: "bilinear_upsample"
61+
core_block:
62+
block_type: "conv_next_block"
63+
kernel_size: 3
64+
activation: "capped_gelu"
65+
upscale_factor: 4
66+
norm: "batch"
67+
68+
down_sampling_block: "avg_pool"
69+
up_sampling_block: "bilinear_upsample"
7070

7171
corrector:
7272
non_negative_corrector_names: null

configs/train_cm4.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -50,33 +50,33 @@ experiment:
5050
project: ocean-emulators
5151
entity: m2lines
5252
group: samudra-train-cm4
53-
network: Samudra
5453
prognostic_vars_key: thermo_dynamic_all
5554
boundary_vars_key: tau_hfds
5655

5756
data: !include data/cm4.yaml
5857

5958

60-
samudra:
61-
ch_width: [157, 200, 250, 300, 400]
62-
n_out: 77
63-
dilation: [1, 2, 4, 8]
64-
n_layers: [1, 1, 1, 1]
59+
model:
6560
pred_residuals: false
6661
last_kernel_size: 3
6762
pad: "circular"
6863

69-
core_block:
70-
block_type: "conv_next_block"
71-
kernel_size: 3
72-
activation: "capped_gelu"
73-
upscale_factor: 4
74-
norm: "batch"
64+
unet:
65+
ch_width: [200, 250, 300, 400]
66+
dilation: [1, 2, 4, 8]
67+
n_layers: [1, 1, 1, 1]
68+
69+
core_block:
70+
block_type: "conv_next_block"
71+
kernel_size: 3
72+
activation: "capped_gelu"
73+
upscale_factor: 4
74+
norm: "batch"
75+
76+
down_sampling_block: "avg_pool"
77+
up_sampling_block: "bilinear_upsample"
7578

7679
corrector:
7780
non_negative_corrector_names:
7881
- "so"
79-
ocean_heat_corrector: true
80-
81-
down_sampling_block: "avg_pool"
82-
up_sampling_block: "bilinear_upsample"
82+
ocean_heat_corrector: true

0 commit comments

Comments
 (0)