Download forgebench/code/ours/mkconfig_batched.py from Ronaldo-GOAT/bert_simpson: direct link, hf CLI and curl.
- Browser
- Download file 892 Bytes
-
https://huggingface.co/Ronaldo-GOAT/bert_simpson/resolve/main/forgebench/code/ours/mkconfig_batched.py
- Command line
-
hf download hf://Ronaldo-GOAT/bert_simpson/forgebench/code/ours/mkconfig_batched.py
-
curl -L -o mkconfig_batched.py https://huggingface.co/Ronaldo-GOAT/bert_simpson/resolve/main/forgebench/code/ours/mkconfig_batched.py
892 Bytes
| #!/usr/bin/env python3 | |
| # args: base out stage1_cache out_root ds exp views sched_csv batch_size single(0/1) | |
| import sys | |
| base,out,stage1_cache,out_root,ds,exp,views,sched,bs,single = sys.argv[1:11] | |
| txt=open(base).read() | |
| idx=txt.index('\nval_appforce:'); head=txt[:idx] | |
| sched_list='['+', '.join(sched.split(','))+']' | |
| single_yaml = 'true' if str(single) in ('1','true','True') else 'false' | |
| block=f""" | |
| val_appforce: | |
| enabled: true | |
| every: 5000 | |
| at_step0: false | |
| views: {views} | |
| schedules: {sched_list} | |
| seed: 42 | |
| limit: 0 | |
| batch_size: {int(bs)} | |
| single: {single_yaml} | |
| decode_procs: 1 | |
| ref_threads: 8 | |
| stage1_cache: {stage1_cache} | |
| out_root: {out_root} | |
| ref_python: /lp-dev/jonghoon/mv-mesh/envs/mv-sam3d/bin/python | |
| eval_dataset_flag: toys4k | |
| datasets: | |
| - name: {ds} | |
| exp: {exp} | |
| """ | |
| open(out,'w').write(head+block); print("wrote",out,"batch_size",bs,"single",single_yaml) | |