Skip to content

Commit

Permalink
support dp convert-from 1.1 (#1587)
Browse files Browse the repository at this point in the history
* support `dp convert-from 1.1`

#1583
It looks like there's no breaking changes between v1.1 and v1.2.

* update doc
  • Loading branch information
njzjz authored Mar 23, 2022
1 parent 1503fc3 commit c49533e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion deepmd/entrypoints/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ def convert(
output_model: str,
**kwargs,
):
if FROM == '1.2':
if FROM in ['1.1', '1.2']:
# no difference between 1.1 and 1.2
convert_12_to_21(input_model, output_model)
elif FROM == '1.3':
convert_13_to_21(input_model, output_model)
Expand Down
2 changes: 1 addition & 1 deletion deepmd/entrypoints/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def parse_args(args: Optional[List[str]] = None):
parser_transform.add_argument(
'FROM',
type = str,
choices = ['1.2', '1.3', '2.0'],
choices = ['1.1', '1.2', '1.3', '2.0'],
help="The original model compatibility",
)
parser_transform.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion doc/troubleshooting/model-compatability.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ One can execute `dp convert-from` to convert an old model to a new one.

| Model version | v0.12 | v1.0 | v1.1 | v1.2 | v1.3 | v2.0 | v2.1 |
|:-:|:-----------:|:----------:|:----------:|:----------:|:----------:|:----------:|:----------:|
| Compatibility | 😢 | 😢 | 😢 | 😊 | 😊 | 😄 | 😄 |
| Compatibility | 😢 | 😢 | 😊 | 😊 | 😊 | 😄 | 😄 |

**Legend**:
- 😄: The model is compatible with the DeePMD-kit package.
Expand Down

0 comments on commit c49533e

Please sign in to comment.