File size: 894 Bytes
fc329a3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)