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

improve robustness of the simple runscript #1307

Merged
merged 2 commits into from
Apr 14, 2021
Merged
Changes from all commits
Commits
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
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