Skip to content

Commit 265d094

Browse files
authored
chore: update dpa3 example (#4778)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new dynamic configuration option for model training, offering greater flexibility in hyperparameter and training setup customization. - **Enhancements** - Updated existing configuration parameters to provide more control over model behavior and feature selection. - **Tests** - Expanded test coverage to include the new dynamic configuration file, ensuring validation of its setup and arguments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent d36677d commit 265d094

File tree

3 files changed

+108
-5
lines changed

3 files changed

+108
-5
lines changed

examples/water/dpa3/input_torch.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,25 @@
88
"descriptor": {
99
"type": "dpa3",
1010
"repflow": {
11-
"n_dim": 256,
12-
"e_dim": 128,
11+
"n_dim": 128,
12+
"e_dim": 64,
1313
"a_dim": 32,
1414
"nlayers": 6,
1515
"e_rcut": 6.0,
16-
"e_rcut_smth": 3.0,
16+
"e_rcut_smth": 5.3,
1717
"e_sel": 120,
1818
"a_rcut": 4.0,
19-
"a_rcut_smth": 2.0,
19+
"a_rcut_smth": 3.5,
2020
"a_sel": 30,
2121
"axis_neuron": 4,
22-
"skip_stat": true,
22+
"fix_stat_std": 0.3,
2323
"a_compress_rate": 1,
2424
"a_compress_e_rate": 2,
2525
"a_compress_use_split": true,
2626
"update_angle": true,
27+
"smooth_edge_update": true,
28+
"edge_init_use_dist": true,
29+
"use_exp_switch": true,
2730
"update_style": "res_residual",
2831
"update_residual": 0.1,
2932
"update_residual_init": "const"
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"_comment": "that's all",
3+
"model": {
4+
"type_map": [
5+
"O",
6+
"H"
7+
],
8+
"descriptor": {
9+
"type": "dpa3",
10+
"repflow": {
11+
"n_dim": 128,
12+
"e_dim": 64,
13+
"a_dim": 32,
14+
"nlayers": 6,
15+
"e_rcut": 6.0,
16+
"e_rcut_smth": 5.3,
17+
"e_sel": 1200,
18+
"a_rcut": 4.0,
19+
"a_rcut_smth": 3.5,
20+
"a_sel": 300,
21+
"axis_neuron": 4,
22+
"fix_stat_std": 0.3,
23+
"a_compress_rate": 1,
24+
"a_compress_e_rate": 2,
25+
"a_compress_use_split": true,
26+
"update_angle": true,
27+
"smooth_edge_update": true,
28+
"edge_init_use_dist": true,
29+
"use_dynamic_sel": true,
30+
"sel_reduce_factor": 10.0,
31+
"use_exp_switch": true,
32+
"update_style": "res_residual",
33+
"update_residual": 0.1,
34+
"update_residual_init": "const"
35+
},
36+
"activation_function": "silut:10.0",
37+
"use_tebd_bias": false,
38+
"precision": "float32",
39+
"concat_output_tebd": false
40+
},
41+
"fitting_net": {
42+
"neuron": [
43+
240,
44+
240,
45+
240
46+
],
47+
"resnet_dt": true,
48+
"precision": "float32",
49+
"activation_function": "silut:10.0",
50+
"seed": 1,
51+
"_comment": " that's all"
52+
},
53+
"_comment": " that's all"
54+
},
55+
"learning_rate": {
56+
"type": "exp",
57+
"decay_steps": 5000,
58+
"start_lr": 0.001,
59+
"stop_lr": 3e-5,
60+
"_comment": "that's all"
61+
},
62+
"loss": {
63+
"type": "ener",
64+
"start_pref_e": 0.2,
65+
"limit_pref_e": 20,
66+
"start_pref_f": 100,
67+
"limit_pref_f": 60,
68+
"start_pref_v": 0.02,
69+
"limit_pref_v": 1,
70+
"_comment": " that's all"
71+
},
72+
"training": {
73+
"stat_file": "./dpa3.hdf5",
74+
"training_data": {
75+
"systems": [
76+
"../data/data_0",
77+
"../data/data_1",
78+
"../data/data_2"
79+
],
80+
"batch_size": 1,
81+
"_comment": "that's all"
82+
},
83+
"validation_data": {
84+
"systems": [
85+
"../data/data_3"
86+
],
87+
"batch_size": 1,
88+
"_comment": "that's all"
89+
},
90+
"numb_steps": 1000000,
91+
"warmup_steps": 0,
92+
"gradient_max_norm": 5.0,
93+
"seed": 10,
94+
"disp_file": "lcurve.out",
95+
"disp_freq": 100,
96+
"save_freq": 2000,
97+
"_comment": "that's all"
98+
}
99+
}

source/tests/common/test_examples.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
p_examples / "water" / "dpa2" / "input_torch_large.json",
6060
p_examples / "water" / "dpa2" / "input_torch_compressible.json",
6161
p_examples / "water" / "dpa3" / "input_torch.json",
62+
p_examples / "water" / "dpa3" / "input_torch_dynamic.json",
6263
p_examples / "property" / "train" / "input_torch.json",
6364
p_examples / "water" / "se_e3_tebd" / "input_torch.json",
6465
p_examples / "hessian" / "single_task" / "input.json",

0 commit comments

Comments
 (0)