From 42949cdc630487ff8b2aeebc58f1467e02603a99 Mon Sep 17 00:00:00 2001 From: Scott Wu <71915685+scott-5@users.noreply.github.com> Date: Sun, 22 Sep 2024 11:59:44 +0800 Subject: [PATCH 1/5] Update the default deepmd_version setting make it to be consisten with the doc Signed-off-by: Scott Wu <71915685+scott-5@users.noreply.github.com> --- dpgen/generator/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpgen/generator/run.py b/dpgen/generator/run.py index 81a105b64..fa70d1cc3 100644 --- a/dpgen/generator/run.py +++ b/dpgen/generator/run.py @@ -4693,7 +4693,7 @@ def post_fp(iter_index, jdata): def set_version(mdata): - deepmd_version = "1" + deepmd_version = "2" mdata["deepmd_version"] = deepmd_version return mdata From ab01cc53e7bd8061e7fc73d020cbf6582947bb04 Mon Sep 17 00:00:00 2001 From: Scott Wu <71915685+scott-5@users.noreply.github.com> Date: Sun, 22 Sep 2024 13:35:29 +0800 Subject: [PATCH 2/5] Prevent duplicate output of dpgen.log to stderr dlog logger defaults to broadcasting logs to root logger causing unclear output. So disable propagation to keep the output clear. Signed-off-by: Scott Wu <71915685+scott-5@users.noreply.github.com> --- dpgen/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dpgen/__init__.py b/dpgen/__init__.py index 3fad112f2..4fae2df69 100644 --- a/dpgen/__init__.py +++ b/dpgen/__init__.py @@ -5,6 +5,7 @@ NAME = "dpgen" SHORT_CMD = "dpgen" dlog = logging.getLogger(__name__) +dlog.propagate = False dlog.setLevel(logging.INFO) dlogf = logging.FileHandler(os.getcwd() + os.sep + SHORT_CMD + ".log", delay=True) dlogf_formatter = logging.Formatter("%(asctime)s - %(levelname)s : %(message)s") From 79b06213061ce0c0039886eb35f9704f5555a71d Mon Sep 17 00:00:00 2001 From: Scott Wu <71915685+scott-5@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:04:16 +0800 Subject: [PATCH 3/5] make the screen output complete Signed-off-by: Scott Wu <71915685+scott-5@users.noreply.github.com> --- dpgen/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpgen/__init__.py b/dpgen/__init__.py index 4fae2df69..09561e262 100644 --- a/dpgen/__init__.py +++ b/dpgen/__init__.py @@ -5,13 +5,13 @@ NAME = "dpgen" SHORT_CMD = "dpgen" dlog = logging.getLogger(__name__) -dlog.propagate = False dlog.setLevel(logging.INFO) dlogf = logging.FileHandler(os.getcwd() + os.sep + SHORT_CMD + ".log", delay=True) dlogf_formatter = logging.Formatter("%(asctime)s - %(levelname)s : %(message)s") # dlogf_formatter=logging.Formatter('%(asctime)s - %(name)s - [%(filename)s:%(funcName)s - %(lineno)d ] - %(levelname)s \n %(message)s') dlogf.setFormatter(dlogf_formatter) dlog.addHandler(dlogf) +logging.addHandler(logging.StreamHandler()) __author__ = "Han Wang" __copyright__ = "Copyright 2019" From c8b3dbe4d02e3cfeaaa2388db8cebcba8af610fe Mon Sep 17 00:00:00 2001 From: Scott Wu <71915685+scott-5@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:21:10 +0800 Subject: [PATCH 4/5] Update __init__.py Signed-off-by: Scott Wu <71915685+scott-5@users.noreply.github.com> --- dpgen/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpgen/__init__.py b/dpgen/__init__.py index 09561e262..6e6e10229 100644 --- a/dpgen/__init__.py +++ b/dpgen/__init__.py @@ -11,7 +11,7 @@ # dlogf_formatter=logging.Formatter('%(asctime)s - %(name)s - [%(filename)s:%(funcName)s - %(lineno)d ] - %(levelname)s \n %(message)s') dlogf.setFormatter(dlogf_formatter) dlog.addHandler(dlogf) -logging.addHandler(logging.StreamHandler()) +logging.basicConfig(level=logging.WARNING) __author__ = "Han Wang" __copyright__ = "Copyright 2019" From 00cc227094ab0eaab9af849e2d51bf2df9923295 Mon Sep 17 00:00:00 2001 From: Scott Wu <71915685+scott-5@users.noreply.github.com> Date: Fri, 27 Sep 2024 18:06:00 +0800 Subject: [PATCH 5/5] Update machine-local-v1.json Signed-off-by: Scott Wu <71915685+scott-5@users.noreply.github.com> --- tests/generator/machine-local-v1.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generator/machine-local-v1.json b/tests/generator/machine-local-v1.json index 6ffac93a7..0ec4ebe34 100644 --- a/tests/generator/machine-local-v1.json +++ b/tests/generator/machine-local-v1.json @@ -1,4 +1,5 @@ { + "deepmd_version": "1", "train_machine": { "machine_type": "shell", "lazy_local": true