Found by Codex global repository scan of deepmodeling/dpgen2 at commit 2679611a3704f5c2646c8cb353e34177518db758.
Workflow submission reads train.template_script from disk immediately:
|
type_map = config["inputs"]["type_map"] |
|
numb_models = config["train"]["numb_models"] |
|
template_script_ = config["train"]["template_script"] |
|
if isinstance(template_script_, list): |
|
template_script = [json.loads(Path(ii).read_text()) for ii in template_script_] |
|
else: |
|
template_script = json.loads(Path(template_script_).read_text()) |
Several examples point template_script at train.json, but their example directories do not include that file. Examples include:
|
"template_script": "train.json", |
|
"template_script": "train.json", |
|
"template_script": "train.json", |
|
"template_script": "train.json", |
The current example test only loads and normalizes the JSON, so it does not catch missing referenced files:
|
class TestExamples(unittest.TestCase): |
|
def test_arguments(self): |
|
for fn in input_files: |
|
with self.subTest(fn=fn): |
|
with open(fn) as f: |
|
jdata = json.load(f) |
|
normalize(jdata) |
Suggested fix: make examples self-contained by pointing at files that exist in their directories, add the missing templates, or enhance the example test to resolve and validate template_script paths.
Found by Codex global repository scan of
deepmodeling/dpgen2at commit2679611a3704f5c2646c8cb353e34177518db758.Workflow submission reads
train.template_scriptfrom disk immediately:dpgen2/dpgen2/entrypoint/submit.py
Lines 555 to 561 in 2679611
Several examples point
template_scriptattrain.json, but their example directories do not include that file. Examples include:dpgen2/examples/calypso/input.test.json
Line 392 in 2679611
dpgen2/examples/ch4/input_dist.json
Line 132 in 2679611
dpgen2/examples/diffcsp/dpgen.json
Line 385 in 2679611
dpgen2/examples/water/input_dpgen.json
Line 372 in 2679611
The current example test only loads and normalizes the JSON, so it does not catch missing referenced files:
dpgen2/tests/test_check_examples.py
Lines 30 to 36 in 2679611
Suggested fix: make examples self-contained by pointing at files that exist in their directories, add the missing templates, or enhance the example test to resolve and validate
template_scriptpaths.