Skip to content

Commit

Permalink
add dp --version (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Aug 19, 2021
1 parent 795a79b commit 4f54de0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions deepmd/entrypoints/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path
from typing import Dict, List, Optional

from deepmd import __version__
from deepmd.entrypoints import (
compress,
config,
Expand Down Expand Up @@ -395,6 +396,8 @@ def parse_args(args: Optional[List[str]] = None):
type=str,
help='the output model',
)
# --version
parser.add_argument('--version', action='version', version='DeePMD-kit v%s' % __version__)

parsed_args = parser.parse_args(args=args)
if parsed_args.command is None:
Expand Down

0 comments on commit 4f54de0

Please sign in to comment.