Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
121 changes: 91 additions & 30 deletions config/default_config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# streams_directory: "./config/streams/era5_1deg/"
streams_directory: "./config/streams/era5_nppatms_synop/"
streams_directory: "./config/streams/era5_1deg/"
# streams_directory: "./config/streams/era5_nppatms_synop/"

embed_orientation: "channels"
embed_unembed_mode: "block"
Expand Down Expand Up @@ -119,28 +119,28 @@ ema_halflife_in_thousands: 1e-3

# Student-teacher configuration (only used when training_mode == "student_teacher")
# TODO: adapt so that the masking or forecast config entry also sits here
training_config:
# when this is "masking", we are basically only using the model_input subconfig
training_mode: "masking" # "masking", "student_teacher", "forecast"

model_input:
- masking_strategy: "random" # "random", "healpix". Masking strategy to use for model input for masking, and local (student) views when doing student-teacher
num_samples: 1 # if student-teacher, the number of local (student) views to generate
masking_strategy_config : { diffusion_rn : True, rate : 0.4 }
# masking_strategy_config: {"strategies": ["random", "healpix", "channel"],
# "probabilities": [0.34, 0.33, 0.33],
# "hl_mask": 3, "mode": "per_cell",
# "same_strategy_per_batch": false
# }
# relationship: "independent" #, "subset", "disjoint". Relationship of student views to teacher view.
relationship: "complement" # "independent", "subset", "disjoint". Relationship of student views to teacher view.
num_steps_input: 2
# loss : ibot
loss :
training :
- LossPhysical: {weight: 0.7, loss_fcts: [['mse', 0.8], ['mae', 0.2]]}
validation :
- LossPhysical: {weight: 1.0, loss_fcts: [['mse', 0.8]]}
# training_config:
# # when this is "masking", we are basically only using the model_input subconfig
# training_mode: "masking" # "masking", "student_teacher", "forecast"

# model_input:
# - masking_strategy: "random" # "random", "healpix". Masking strategy to use for model input for masking, and local (student) views when doing student-teacher
# num_samples: 1 # if student-teacher, the number of local (student) views to generate
# masking_strategy_config : { diffusion_rn : True, rate : 0.4 }
# # masking_strategy_config: {"strategies": ["random", "healpix", "channel"],
# # "probabilities": [0.34, 0.33, 0.33],
# # "hl_mask": 3, "mode": "per_cell",
# # "same_strategy_per_batch": false
# # }
# # relationship: "independent" #, "subset", "disjoint". Relationship of student views to teacher view.
# relationship: "complement" # "independent", "subset", "disjoint". Relationship of student views to teacher view.
# num_steps_input: 2
# # loss : ibot
# loss :
# training :
# - LossPhysical: {weight: 0.7, loss_fcts: [['mse', 0.8], ['mae', 0.2]]}
# validation :
# - LossPhysical: {weight: 1.0, loss_fcts: [['mse', 0.8]]}
# - masking_strategy: "random"
# num_samples: 2 # if student-teacher, the number of local (student) views to generate
# masking_strategy_config : { diffusion_rn : True, rate : 0.4 }
Expand Down Expand Up @@ -187,12 +187,73 @@ training_config:
# num_samples: 1 # if student-teacher, the number of local (student) views to generate
# masking_strategy_config : { rate : 0.4 }

# # masking_strategy: "cropping" # Strategy for teacher (global) view: "random", "healpix"
# # rate: 0.1 # Fraction of data to keep in global view (alternative: use "keep_m" for absolute count)
# # num_samples: 2 # number of teacher views to generate
# # hl_mask : 0 # healpix level to use for healpix masking strategy
# # # keep_m: 100 # Alternative to rate: keep exactly this many parent cells
# # rate_sampling: true # randomly sample the rate per batch
# ========================================
# CROPPING EXAMPLES (cropping_healpix strategy)
# ========================================
# Spatial cropping: select and KEEP a spatially contiguous region, masking everything else
# This is the inverse of healpix masking - perfect for SSL methods like DINO/JEPA/IBOT

# Example 1: Basic spatial cropping (single global crop - 75% of sphere)
training_config:
training_mode: "masking"
model_input:
- masking_strategy: "cropping_healpix"
num_samples: 1
masking_strategy_config:
hl_mask: 0 # HEALPix level for cropping (must be < healpix_level)
rate: 0.75 # Fraction of cells to KEEP (0.75 = keep 75%, mask 25%)
method: "geodesic_disk" # Options: "disk", "random_walk", "geodesic_disk" (recommended)
relationship: "independent"
num_steps_input: 1
loss:
training:
- LossPhysical: {weight: 1.0, loss_fcts: [['mse', 1.0]]}

# Example 2: DINO-style training (1 global + 3 local crops)
# training_config:
# training_mode: "masking"
# target_input:
# - masking_strategy: "cropping_healpix"
# num_samples: 1
# masking_strategy_config: {hl_mask: 0, rate: 0.75, method: "geodesic_disk"}
# model_input:
# - masking_strategy: "cropping_healpix"
# num_samples: 3 # Creates 3 independent local crops
# masking_strategy_config: {hl_mask: 0, rate: 0.4, method: "geodesic_disk"}
# relationship: "independent"
# num_steps_input: 1
# loss:
# training:
# - LossPhysical: {weight: 1.0, loss_fcts: [['mse', 1.0]]}

# Example 3: IBOT-style training (1 global teacher + 1 local student with controlled overlap)
# training_config:
# training_mode: "masking"
# target_input:
# - masking_strategy: "cropping_healpix"
# num_samples: 1
# masking_strategy_config:
# hl_mask: 2 # HEALPix level 2 = 192 parent cells
# rate: 0.5 # Teacher crop: 50% of sphere
# method: "geodesic_disk"
# model_input:
# - masking_strategy: "cropping_healpix"
# num_samples: 1
# masking_strategy_config:
# hl_mask: 2 # Same level for consistent cropping
# rate: 0.3 # Student crop: 30% of sphere
# method: "geodesic_disk"
# overlap_ratio: 0.5 # 50% of student overlaps with teacher (15% overlap, 15% independent)
# relationship: "independent"
# num_steps_input: 1
# loss:
# training:
# - LossPhysical: {weight: 1.0, loss_fcts: [['mse', 1.0]]}
#
# Note: overlap_ratio controls what fraction of the STUDENT crop comes from the teacher:
# - 0.0 = completely disjoint (no overlap)
# - 0.5 = half of student overlaps with teacher
# - 1.0 = student is complete subset of teacher

num_mini_epochs: 32
samples_per_mini_epoch: 64 #4096
Expand Down
Loading