Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solve Path error on Windows #1627

Merged
merged 71 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
575c5a9
begin add gpaw
thangckt Mar 16, 2024
3be325d
Create gpaw.py
thangckt Mar 29, 2024
d3cc70d
Merge pull request #1 from deepmodeling/devel
thangckt Mar 29, 2024
547e13b
Update gpaw.py
thangckt Apr 1, 2024
cfa904b
u
thangckt Apr 1, 2024
946561b
Update arginfo.py
thangckt Apr 2, 2024
11103f5
Merge pull request #2 from deepmodeling/devel
thangckt Apr 2, 2024
0ddbf7c
u
thangckt Apr 2, 2024
0b94ff6
u
thangckt Apr 3, 2024
494b796
u
thangckt Apr 4, 2024
2a58c7e
Merge branch 'devel' of https://github.com/thangckt/dpgen into devel
thangckt Apr 4, 2024
01fbd2f
Merge pull request #4 from deepmodeling/devel
thangckt May 2, 2024
babd77e
modify to use pytorch
thangckt May 5, 2024
28b8a49
option to choose between TF and PT
thangckt May 6, 2024
2822be0
Delete gpaw.py
thangckt May 6, 2024
99efd85
finish add option to select TF/PT
thangckt May 7, 2024
bdecc9f
Merge pull request #5 from deepmodeling/devel
thangckt May 7, 2024
f4f5665
Merge pull request #6 from thangckt/devel
thangckt May 7, 2024
ef1df18
remove GPAW to PR
thangckt May 7, 2024
a1b3ff8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2024
11dca54
Update simplify.py
thangckt May 7, 2024
a0684ca
Merge branch 'PR' of https://github.com/thangckt/dpgen into PR
thangckt May 7, 2024
220735d
Revert "Merge branch 'PR' of https://github.com/thangckt/dpgen into PR"
thangckt May 7, 2024
8f7f491
reset add GPAW from here
thangckt May 7, 2024
05b2412
u
thangckt May 7, 2024
ed832e8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2024
af3fc27
Update arginfo.py
thangckt May 7, 2024
8a949d0
u
thangckt May 7, 2024
7def8ef
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2024
52a9989
Update run.py
thangckt May 7, 2024
0d99ea9
Merge branch 'PR' of https://github.com/thangckt/dpgen into PR
thangckt May 7, 2024
8bdea17
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2024
67fab2b
Merge branch 'devel' into PR
thangckt May 7, 2024
706146a
Update run.py
thangckt May 8, 2024
e72f4c8
Merge branch 'devel' into PR
thangckt May 8, 2024
30c8c67
Merge pull request #7 from thangckt/PR
thangckt May 8, 2024
98eccb8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 8, 2024
702510c
Update run.py
thangckt May 8, 2024
6ffd1eb
Merge branch 'PR' of https://github.com/thangckt/dpgen into PR
thangckt May 8, 2024
3eb40de
Merge pull request #8 from thangckt/PR
thangckt May 8, 2024
624a48b
Update arginfo.py
thangckt May 8, 2024
8b31b4a
Merge pull request #9 from thangckt/PR
thangckt May 8, 2024
ce7c738
Update arginfo.py
thangckt May 8, 2024
090f209
Update run.py
thangckt May 9, 2024
b41caca
Update run.py
thangckt May 9, 2024
6ceecbf
Update run.py
thangckt May 9, 2024
cb1d971
Update run.py
thangckt May 9, 2024
ae35763
separate GPAW's functions into file lib/gpaw.py
thangckt May 9, 2024
cdcd4ac
Update gpaw.py
thangckt May 9, 2024
c405b55
u
thangckt May 9, 2024
cc20cc0
Update run.py
thangckt May 10, 2024
e6855ad
Update run.py
thangckt May 10, 2024
d5f66f2
Update run.py
thangckt May 10, 2024
4faa79e
Merge pull request #10 from thangckt/add_gpaw
thangckt May 10, 2024
c806566
Merge pull request #11 from deepmodeling/devel
thangckt May 10, 2024
d890ed6
Merge branch 'devel' into devel_tha
thangckt May 19, 2024
cc40957
Merge pull request #13 from thangckt/devel
thangckt May 23, 2024
7efb07e
Merge pull request #22 from thangckt/add_gpaw
thangckt Jun 20, 2024
0ca35ec
Merge pull request #27 from deepmodeling/devel
thangckt Aug 23, 2024
82a23ed
Update run.py
thangckt Aug 27, 2024
9aef0bc
i
thangckt Aug 27, 2024
d16fbbc
u
thangckt Aug 27, 2024
fcbcbc1
Update run.py
thangckt Aug 27, 2024
290253a
Update run.py
thangckt Aug 27, 2024
8bede16
Merge branch 'devel' into devel_original
thangckt Aug 27, 2024
62f40d5
Update run.py
thangckt Aug 27, 2024
dc73a4f
Update run.py
thangckt Aug 27, 2024
a20e84e
Update run.py
thangckt Aug 27, 2024
2707435
Update run.py
thangckt Aug 27, 2024
85ea6de
u
thangckt Aug 27, 2024
3ae18a5
Merge pull request #29 from deepmodeling/devel
thangckt Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ def make_train_dp(iter_index, jdata, mdata):
# train_param = jdata['train_param']
train_input_file = default_train_input_file
numb_models = jdata["numb_models"]
init_data_prefix = jdata["init_data_prefix"]
init_data_prefix = os.path.abspath(init_data_prefix)
init_data_prefix = os.path.abspath(jdata["init_data_prefix"])
init_data_sys_ = jdata["init_data_sys"]
fp_task_min = jdata["fp_task_min"]
model_devi_jobs = jdata["model_devi_jobs"]
Expand Down Expand Up @@ -390,14 +389,17 @@ def make_train_dp(iter_index, jdata, mdata):
sys_paths = expand_sys_str(os.path.join(init_data_prefix, ii))
for single_sys in sys_paths:
init_data_sys.append(
os.path.normpath(
os.path.join(
"..",
"data.init",
ii,
os.path.relpath(single_sys, os.path.join(init_data_prefix, ii)),
Path(
os.path.normpath(
os.path.join(
"../data.init",
ii,
os.path.relpath(
single_sys, os.path.join(init_data_prefix, ii)
),
)
)
)
).as_posix()
)
init_batch_size.append(detect_batch_size(ss, single_sys))
if auto_ratio:
Expand Down Expand Up @@ -435,7 +437,9 @@ def make_train_dp(iter_index, jdata, mdata):
continue
for sys_single in sys_paths:
init_data_sys.append(
os.path.normpath(os.path.join("..", "data.iters", sys_single))
Path(
os.path.normpath(os.path.join("../data.iters", sys_single))
).as_posix()
)
batch_size = (
sys_batch_size[sys_idx]
Expand Down Expand Up @@ -763,8 +767,6 @@ def run_train_dp(iter_index, jdata, mdata):
if suffix == ".pth":
train_command += " --pt"

train_resources = mdata["train_resources"]

# paths
iter_name = make_iter_name(iter_index)
work_path = os.path.join(iter_name, train_name)
Expand Down Expand Up @@ -1558,7 +1560,7 @@ def _make_model_devi_native(iter_index, jdata, mdata, conf_systems):
models = sorted(glob.glob(os.path.join(train_path, f"graph*{suffix}")))
task_model_list = []
for ii in models:
task_model_list.append(os.path.join("..", os.path.basename(ii)))
task_model_list.append(Path(f"../{Path(ii).name}").as_posix())
work_path = os.path.join(iter_name, model_devi_name)

sys_counter = 0
Expand Down