simplexuq-code / scripts /run_single_task.py
anonymous0523ly's picture
Initial anonymous code release
fc329a3 verified
raw
history blame
894 Bytes
import argparse
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
TASK_MAP = {
'synthetic': [sys.executable, str(ROOT / 'scripts' / 'run_synthetic.py')],
'cifar10': [sys.executable, str(ROOT / 'scripts' / 'run_softmax.py')],
'topics': [sys.executable, str(ROOT / 'scripts' / 'run_topics.py')],
'samson': [sys.executable, str(ROOT / 'scripts' / 'run_hyperspectral.py')],
'pbmc': [sys.executable, str(ROOT / 'scripts' / 'run_bulk_deconv.py')],
'utkface': [sys.executable, str(ROOT / 'scripts' / 'run_age_ldl.py')],
'affectivetext': [sys.executable, str(ROOT / 'scripts' / 'run_affective_text.py')],
}
parser = argparse.ArgumentParser()
parser.add_argument('task', choices=TASK_MAP)
parser.add_argument('extra', nargs=argparse.REMAINDER)
args = parser.parse_args()
subprocess.check_call(TASK_MAP[args.task] + args.extra)