-
Notifications
You must be signed in to change notification settings - Fork 4
/
01_submit_fit_models.py
39 lines (32 loc) · 1.46 KB
/
01_submit_fit_models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from slurmpy import Slurm
import config
from itertools import product
config_name = 'figs_ensembles'
DATASETS_CLASSIFICATION, DATASETS_REGRESSION, \
ESTIMATORS_CLASSIFICATION, ESTIMATORS_REGRESSION = config.get_configs(config_name)
partition = 'high'
# partition = 'low'
s = Slurm("fit", {"partition": partition})
# individual alterations
# DATASETS_CLASSIFICATION = []
# ESTIMATORS_CLASSIFICATION = []
if __name__ == '__main__':
split_seeds = range(0, 5)
est_ds_lst = list(product(DATASETS_CLASSIFICATION, ESTIMATORS_CLASSIFICATION)) \
+ list(product(DATASETS_REGRESSION, ESTIMATORS_REGRESSION))
# est_ds_lst = list(product(DATASETS_REGRESSION, ESTIMATORS_REGRESSION))
for split_seed in split_seeds:
for dset, est in est_ds_lst:
param_str = ''
# param_str = 'source ~/chandan/imodels_env/bin/activate; '
# param_str += 'module load python'
# param_str += '/accounts/campus/omer_ronen/.conda/envs/imdls_expr/bin/python 01_fit_models.py '
param_str = '/usr/local/linux/anaconda3.8/bin/python3 01_fit_models.py '
param_str += f'--dataset "{dset[0]}" '
param_str += f'--model "{est[0]}" '
param_str += f'--config {config_name} '
param_str += f'--split_seed {split_seed} '
# param_str += f'--regression '
# param_str += '--ignore_cache'
s.run(param_str)
print(param_str)