forked from dptech-corp/dpgen2
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding dflow debug mode for dpgen2, which is more convenient for `knowledge distillation` in many cases. One can run the program without argo as long as `DeePMD-kit` and `lammps` are installed in local environment. --------- Co-authored-by: Sikai Yao <yaosk@dp.tech> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
bd49041
commit 4d517c5
Showing
6 changed files
with
47 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
from dflow.utils import run_command as dflow_run_command | ||
from dflow import config | ||
from typing import Tuple, Union, List | ||
import os | ||
|
||
|
||
def run_command( | ||
cmd: Union[str, List[str]], | ||
shell: bool = False, | ||
) -> Tuple[int, str, str]: | ||
interactive = False if config["mode"] == "debug" else True | ||
return dflow_run_command( | ||
cmd, | ||
raise_error=False, | ||
try_bash=shell, | ||
cmd, raise_error=False, try_bash=shell, interactive=interactive | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters