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 argparse
import os 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 from tqdm import tqdm
import json import json

View File

@ -1,5 +1,11 @@
import argparse import argparse
import os 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 import json
from copy import deepcopy from copy import deepcopy
from functools import partial from functools import partial

View File

@ -1,5 +1,11 @@
import argparse import argparse
import os 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 from tqdm import tqdm
import regex import regex
import json import json

View File

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