-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval_multiple.py
31 lines (29 loc) · 990 Bytes
/
eval_multiple.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
#%%
from pathlib import Path
#%%
input_dir = '/mnt/storage/kaggle/check_base'
fnames = list(Path(input_dir).glob('*.ckpt'))
#%%
#fnames = [str(fname) for fname in fnames if 'daily-valley' in str(fname)]
fnames = [str(fname) for fname in fnames]
fnames
#%%
configs = []
for fn in fnames:
name = fn.split('/')[-1].split('-')[0] + '-' + fn.split('/')[-1].split('-')[1]
print(name)
targets = list(Path('model_configs').glob(f'{name}*.yaml'))
assert len(targets) == 1
configs.append(targets[0])
#%%
configs
#%%
for check, config in zip(fnames, configs):
!CUDA_VISIBLE_DEVICES=0 python eval.py --test_df /mnt/ssd/kaggle/new_data/test.csv --preds_only --output model_preds/ --model {str(check)} --model_config={str(config)} --val_preds
#%%
#for check, config in zip(fnames, configs):
for check in fnames:
!CUDA_VISIBLE_DEVICES=0 python eval.py --test_df /mnt/ssd/kaggle/new_data/test.csv --preds_only --output model_preds/ --model {str(check)} --val_preds
#%%
1
#%%