Add Control v2 incremental experiment results (evidence, visuals, 42 fixed samples)
a64600b verified Download method_v2/evidence/code/suite/analytic.py from CharlesZhang-USTC/snf_experiments: direct link, hf CLI and curl.
- Browser
- Download file 913 Bytes
-
https://huggingface.co/CharlesZhang-USTC/snf_experiments/resolve/main/method_v2/evidence/code/suite/analytic.py
- Command line
-
hf download hf://CharlesZhang-USTC/snf_experiments/method_v2/evidence/code/suite/analytic.py
-
curl -L -o analytic.py https://huggingface.co/CharlesZhang-USTC/snf_experiments/resolve/main/method_v2/evidence/code/suite/analytic.py
913 Bytes
| """Run existing toy/analytic experiments into a mounted results directory.""" | |
| import argparse | |
| import runpy | |
| from pathlib import Path | |
| from .design import ROOT | |
| ORDER=['run_prior','run_autoregressive','run_commit_order','run_order_metrics','run_granularity','run_statistic','run_context','run_cliff','run_leadin','run_recalibrate','run_laws','run_space'] | |
| def execute(script,output): | |
| output=Path(output).resolve();output.mkdir(parents=True,exist_ok=True) | |
| namespace=runpy.run_path(str(ROOT/'experiments'/f'{script}.py'),run_name='__suite_analytic__') | |
| if 'main' not in namespace:raise ValueError(f'{script} has no main entry') | |
| namespace['main'].__globals__['OUT_DIR']=str(output) | |
| namespace['main']() | |
| if __name__=='__main__': | |
| p=argparse.ArgumentParser();p.add_argument('--script',choices=ORDER,required=True);p.add_argument('--output',required=True);a=p.parse_args();execute(a.script,a.output) | |