File size: 2,545 Bytes
086973a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Ready made graphs created as follows

python -m neural_lam.create_global_graph \
    --config_path sample_data/global_ocean_1.yaml \
    --name global_cluster_graph \
    --type cluster \
    --plot \
    --levels 2 \
    --grid_to_first_mesh_refinement 5 \
    --connect_disconnected

# ==================================================
# Graph statistics
# ==================================================
#   m2m (level 0): 8456 nodes, 48546 edges
#   m2m (level 1): 2097 nodes, 11640 edges
#   m2m (total): 10553 nodes, 60186 edges
#   mesh_up (level 0->1): 8456 edges
#   mesh_down (level 1->0): 8456 edges
#   g2m: 50804 nodes, 70640 edges
#   m2g: 50804 nodes, 126107 edges
# ==================================================

python -m neural_lam.create_global_graph \
    --config_path sample_data/global_ocean_1.yaml \
    --name global_hierarchical_graph \
    --type hierarchical \
    --plot \
    --levels 2 \
    --connect_disconnected \
    --splits 5

# ==================================================
# Graph statistics
# ==================================================
#   m2m (level 0): 7193 nodes, 40638 edges
#   m2m (level 1): 1812 nodes, 9860 edges
#   m2m (total): 9005 nodes, 50498 edges
#   mesh_up (level 0->1): 7193 edges
#   mesh_down (level 1->0): 7193 edges
#   g2m: 49541 nodes, 67147 edges
#   m2g: 49541 nodes, 125603 edges
# ==================================================

# SeaCast training

python -m neural_lam.train_model \
    --config_path sample_data/global_ocean_1.yaml \
    --num_workers 1 \
    --precision bf16-mixed \
    --model graph_fm \
    --graph global_hierarchical_graph \
    --hidden_dim 16 \
    --hidden_dim_grid 8 \
    --hidden_dim_mesh_nodes 8 \
    --hidden_dim_edge 4 \
    --processor_layers 3 \
    --batch_size 1 \
    --lr 0.001 \
    --ar_steps_eval 2 \
    --val_steps_to_log 1 2 \
    --num_sanity_val_steps 0 \
    --num_nodes 1

# Njord training

python -m neural_lam.train_model \
    --config_path sample_data/global_ocean_1.yaml \
    --num_workers 1 \
    --precision bf16-mixed \
    --model graph_efm \
    --graph global_cluster_graph \
    --hidden_dim 16 \
    --hidden_dim_grid 8 \
    --hidden_dim_mesh_nodes 8 \
    --hidden_dim_edge 4 \
    --processor_layers 3 \
    --batch_size 1 \
    --epochs 10 \
    --lr 0.001 \
    --kl_beta 0 \
    --num_sanity_val_steps 0 \
    --ar_steps_train 1 \
    --ar_steps_eval 2 \
    --val_steps_to_log 1 2 \
    --var_leads_val_plot '{"0":[1,2], "1":[1,2], "2":[1,2], "3":[1,2], "9":[1,2], "15":[1,2]}'