Skip to content

Commit f796e5a

Browse files
sakoganjeswan
andauthored
improve robustness of the simple runscript (#1307)
* Simple runscript phases fix Co-authored-by: jeswan <[email protected]>
1 parent 65888b4 commit f796e5a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

jiant/proj/simple/runscript.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import jiant.utils.zconf as zconf
1414
import jiant.utils.python.io as py_io
1515
from jiant.utils.python.logic import replace_none
16+
from jiant.utils.python.io import read_json
1617

1718

1819
@zconf.run_config
@@ -144,7 +145,11 @@ def run_simple(args: RunConfiguration, with_continue: bool = False):
144145
if task_name in phase_task_list and not os.path.exists(
145146
os.path.join(args.exp_dir, "cache", hf_config.model_type, task_name, phase)
146147
):
147-
phases_to_do.append(phase)
148+
config = read_json(task_config_path_dict[task_name])
149+
if phase in config["paths"]:
150+
phases_to_do.append(phase)
151+
else:
152+
phase_task_list.remove(task_name)
148153
if not phases_to_do:
149154
continue
150155
print(f"Tokenizing Task '{task_name}' for phases '{','.join(phases_to_do)}'")

0 commit comments

Comments
 (0)