Skip to content

Commit

Permalink
supports non-list mdata
Browse files Browse the repository at this point in the history
The mdata of a task is a list of a single dict. This "list" looks useless and not clear enough. So this commit supports using the dict without a list.

Note that old parameters are still supported, so no breaking changes are made. The "list" is just removed from all examples. Both list and non-list parameters are in the unittest.
  • Loading branch information
njzjz committed Jun 8, 2022
1 parent 80f2cf7 commit 0660142
Show file tree
Hide file tree
Showing 11 changed files with 2,845 additions and 58 deletions.
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ an example of new dpgen's machine.json
```json
{
"api_version": "1.0",
"train": [
"train":
{
"command": "dp",
"machine": {
Expand All @@ -1163,9 +1163,8 @@ an example of new dpgen's machine.json
"para_deg": 3,
"source_list": ["/home/user1234/deepmd.1.2.4.env"]
}
}
],
"model_devi":[
},
"model_devi":
{
"command": "lmp",
"machine":{
Expand All @@ -1186,9 +1185,8 @@ an example of new dpgen's machine.json
"group_size": 5,
"source_list": ["/home/user1234/deepmd.1.2.4.env"]
}
}
],
"fp":[
},
"fp":
{
"command": "vasp_std",
"machine":{
Expand All @@ -1210,7 +1208,6 @@ an example of new dpgen's machine.json
"source_list": ["~/vasp.env"]
}
}
]
}
```
note1: the key "local_root" in dpgen's machine.json is always `./`
Expand All @@ -1222,7 +1219,7 @@ When switching into a new machine, you may modifying the `MACHINE`, according to
An example for `MACHINE` is:
```json
{
"train": [
"train":
{
"machine": {
"batch": "slurm",
Expand All @@ -1245,9 +1242,8 @@ An example for `MACHINE` is:
"qos": "data"
},
"command": "USERPATH/dp"
}
],
"model_devi": [
},
"model_devi":
{
"machine": {
"batch": "slurm",
Expand All @@ -1271,9 +1267,8 @@ An example for `MACHINE` is:
},
"command": "lmp_serial",
"group_size": 1
}
],
"fp": [
},
"fp":
{
"machine": {
"batch": "slurm",
Expand All @@ -1300,7 +1295,6 @@ An example for `MACHINE` is:
"command": "vasp_gpu",
"group_size": 1
}
]
}
```
Following table illustrates which key is needed for three types of machine: `train`,`model_devi` and `fp`. Each of them is a list of dicts. Each dict can be considered as an independent environmnet for calculation.
Expand Down
Loading

0 comments on commit 0660142

Please sign in to comment.