Skip to content

Commit

Permalink
improve robustness of the simple runscript (#1307)
Browse files Browse the repository at this point in the history
* Simple runscript phases fix

Co-authored-by: jeswan <[email protected]>
  • Loading branch information
sakogan and jeswan authored Apr 14, 2021
1 parent 65888b4 commit f796e5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jiant/proj/simple/runscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import jiant.utils.zconf as zconf
import jiant.utils.python.io as py_io
from jiant.utils.python.logic import replace_none
from jiant.utils.python.io import read_json


@zconf.run_config
Expand Down Expand Up @@ -144,7 +145,11 @@ def run_simple(args: RunConfiguration, with_continue: bool = False):
if task_name in phase_task_list and not os.path.exists(
os.path.join(args.exp_dir, "cache", hf_config.model_type, task_name, phase)
):
phases_to_do.append(phase)
config = read_json(task_config_path_dict[task_name])
if phase in config["paths"]:
phases_to_do.append(phase)
else:
phase_task_list.remove(task_name)
if not phases_to_do:
continue
print(f"Tokenizing Task '{task_name}' for phases '{','.join(phases_to_do)}'")
Expand Down

0 comments on commit f796e5a

Please sign in to comment.