update submit_eval_jobs

This commit is contained in:
ZhihongShao 2024-02-09 15:23:28 +08:00
parent 83d3c4cc6a
commit db877abb91
4 changed files with 32 additions and 15 deletions

View File

@ -1,5 +1,10 @@
import argparse
import os
import sys
import_path = os.path.abspath(__file__)
for _ in range(2):
import_path = os.path.dirname(import_path)
sys.path.append(import_path)
from tqdm import tqdm
import json

View File

@ -1,5 +1,11 @@
import argparse
import os
import sys
import_path = os.path.abspath(__file__)
for _ in range(2):
import_path = os.path.dirname(import_path)
sys.path.append(import_path)
import json
from copy import deepcopy
from functools import partial

View File

@ -1,5 +1,11 @@
import argparse
import os
import sys
import_path = os.path.abspath(__file__)
for _ in range(2):
import_path = os.path.dirname(import_path)
sys.path.append(import_path)
from tqdm import tqdm
import regex
import json

View File

@ -46,21 +46,21 @@ def main():
args = parser.parse_args()
conf = base_conf # TODO: your conf here
for rank in range(args.n_gpus):
cmd = "python run_subset_parallel.py"
for key, val in conf.items():
if key == 'expname':
continue
if isinstance(val, str):
cmd += f" --{key} {val}"
elif val:
cmd += f" --{key}"
cmd += f" --test-conf {conf['test-conf']}"
cmd += f" --n-repeats {args.n_repeats}"
cmd += f" --temperature {args.temperature}"
cmd += f" --rank {rank} &"
print(cmd, flush=True)
os.system(cmd)
cmd = "python run_subset_parallel.py"
for key, val in conf.items():
if key == 'expname':
continue
if isinstance(val, str):
cmd += f" --{key} {val}"
elif val:
cmd += f" --{key}"
cmd += f" --test-conf {conf['test-conf']}"
cmd += f" --n-repeats {args.n_repeats}"
cmd += f" --temperature {args.temperature}"
cmd += f" --ngpus {args.n_gpus}"
cmd += f" --rank {0} &"
print(cmd, flush=True)
os.system(cmd)
if __name__ == '__main__':
main()