-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(training): Add default config files for 2 and 3 level hierarchi…
…cal processors (#50) * chore: hierarchical configs * fix: update default config * fix: update config files * udpate changelog
- Loading branch information
Showing
7 changed files
with
227 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
training/src/anemoi/training/config/graph/hierarchical_2level.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
--- | ||
overwrite: True | ||
|
||
data: "data" | ||
hidden: | ||
- "hidden_1" | ||
- "hidden_2" | ||
|
||
|
||
nodes: | ||
# Data nodes | ||
data: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.ZarrDatasetNodes | ||
dataset: ${dataloader.dataset} | ||
attributes: ${graph.attributes.nodes} | ||
hidden_1: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.TriNodes | ||
resolution: 5 | ||
hidden_2: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.TriNodes | ||
resolution: 4 | ||
|
||
edges: | ||
# Encoder configuration | ||
- source_name: "data" | ||
target_name: "hidden_1" | ||
edge_builder: | ||
_target_: anemoi.graphs.edges.CutOffEdges | ||
cutoff_factor: 0.6 | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Decoder configuration | ||
- source_name: "hidden_1" | ||
target_name: "data" | ||
edge_builder: | ||
_target_: anemoi.graphs.edges.KNNEdges | ||
num_nearest_neighbours: 3 | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Hierarchical connections: downscale | ||
- source_name: "hidden_1" | ||
target_name: "hidden_2" | ||
edge_builder: ${graph.edge_builders.downscale} | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Hierarchical connections: upscale | ||
- source_name: "hidden_2" | ||
target_name: "hidden_1" | ||
edge_builder: ${graph.edge_builders.upscale} | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Hierarchical connections: same level | ||
- source_name: "hidden_1" | ||
target_name: "hidden_1" | ||
edge_builder: ${graph.edge_builders.process} | ||
attributes: ${graph.attributes.edges} | ||
|
||
- source_name: "hidden_2" | ||
target_name: "hidden_2" | ||
edge_builder: ${graph.edge_builders.process} | ||
attributes: ${graph.attributes.edges} | ||
|
||
|
||
############# | ||
edge_builders: | ||
downscale: | ||
_target_: anemoi.graphs.edges.CutOffEdges | ||
cutoff_factor: 1.5 | ||
process: | ||
_target_: anemoi.graphs.edges.MultiScaleEdges | ||
x_hops: 1 | ||
upscale: | ||
_target_: anemoi.graphs.edges.KNNEdges | ||
num_nearest_neighbours: 5 | ||
|
||
attributes: | ||
nodes: | ||
area_weight: | ||
_target_: anemoi.graphs.nodes.attributes.AreaWeights # options: Area, Uniform | ||
norm: unit-max # options: l1, l2, unit-max, unit-sum, unit-std | ||
edges: | ||
edge_dirs: | ||
_target_: anemoi.graphs.edges.attributes.EdgeDirection | ||
norm: unit-std | ||
edge_length: | ||
_target_: anemoi.graphs.edges.attributes.EdgeLength | ||
norm: unit-std |
110 changes: 110 additions & 0 deletions
110
training/src/anemoi/training/config/graph/hierarchical_3level.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
--- | ||
overwrite: True | ||
|
||
data: "data" | ||
hidden: | ||
- "hidden_1" | ||
- "hidden_2" | ||
- "hidden_3" | ||
|
||
|
||
nodes: | ||
# Data nodes | ||
data: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.ZarrDatasetNodes | ||
dataset: ${dataloader.dataset} | ||
attributes: ${graph.attributes.nodes} | ||
hidden_1: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.TriNodes | ||
resolution: 5 | ||
hidden_2: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.TriNodes | ||
resolution: 4 | ||
hidden_3: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.TriNodes | ||
resolution: 3 | ||
|
||
edges: | ||
# Encoder configuration | ||
- source_name: "data" | ||
target_name: "hidden_1" | ||
edge_builder: | ||
_target_: anemoi.graphs.edges.CutOffEdges | ||
cutoff_factor: 0.6 | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Decoder configuration | ||
- source_name: "hidden_1" | ||
target_name: "data" | ||
edge_builder: | ||
_target_: anemoi.graphs.edges.KNNEdges | ||
num_nearest_neighbours: 3 | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Hierarchical connections: downscale | ||
- source_name: "hidden_1" | ||
target_name: "hidden_2" | ||
edge_builder: ${graph.edge_builders.downscale} | ||
attributes: ${graph.attributes.edges} | ||
|
||
- source_name: "hidden_2" | ||
target_name: "hidden_3" | ||
edge_builder: ${graph.edge_builders.downscale} | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Hierarchical connections: upscale | ||
- source_name: "hidden_3" | ||
target_name: "hidden_2" | ||
edge_builder: ${graph.edge_builders.upscale} | ||
attributes: ${graph.attributes.edges} | ||
|
||
- source_name: "hidden_2" | ||
target_name: "hidden_1" | ||
edge_builder: ${graph.edge_builders.upscale} | ||
attributes: ${graph.attributes.edges} | ||
|
||
# Hierarchical connections: same level | ||
- source_name: "hidden_1" | ||
target_name: "hidden_1" | ||
edge_builder: ${graph.edge_builders.process} | ||
attributes: ${graph.attributes.edges} | ||
|
||
- source_name: "hidden_2" | ||
target_name: "hidden_2" | ||
edge_builder: ${graph.edge_builders.process} | ||
attributes: ${graph.attributes.edges} | ||
|
||
- source_name: "hidden_3" | ||
target_name: "hidden_3" | ||
edge_builder: ${graph.edge_builders.process} | ||
attributes: ${graph.attributes.edges} | ||
|
||
|
||
############# | ||
edge_builders: | ||
downscale: | ||
_target_: anemoi.graphs.edges.CutOffEdges | ||
cutoff_factor: 1.5 | ||
process: | ||
_target_: anemoi.graphs.edges.MultiScaleEdges | ||
x_hops: 1 | ||
upscale: | ||
_target_: anemoi.graphs.edges.KNNEdges | ||
num_nearest_neighbours: 5 | ||
|
||
attributes: | ||
nodes: | ||
area_weight: | ||
_target_: anemoi.graphs.nodes.attributes.AreaWeights # options: Area, Uniform | ||
norm: unit-max # options: l1, l2, unit-max, unit-sum, unit-std | ||
edges: | ||
edge_dirs: | ||
_target_: anemoi.graphs.edges.attributes.EdgeDirection | ||
norm: unit-std | ||
edge_length: | ||
_target_: anemoi.graphs.edges.attributes.EdgeLength | ||
norm: unit-std |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
defaults: | ||
- data: zarr | ||
- dataloader: native_grid | ||
- diagnostics: evaluation | ||
- hardware: example | ||
- graph: hierarchical_3level | ||
- model: graphtransformer | ||
- training: default | ||
- _self_ | ||
|
||
|
||
### This file is for local experimentation. | ||
## When you commit your changes, assign the new features and keywords | ||
## to the correct defaults. | ||
# For example to change from default GPU count: | ||
# hardware: | ||
# num_gpus_per_node: 1 | ||
|
||
model: | ||
model: | ||
_target_: anemoi.models.models.AnemoiModelEncProcDecHierarchical | ||
enable_hierarchical_level_processing: True | ||
level_process_num_layers: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters