Download tests/test_reporting.py from RL-MIND/DeciCo-RSI: direct link, hf CLI and curl.
- Browser
- Download file 1.06 kB
-
https://huggingface.co/RL-MIND/DeciCo-RSI/resolve/main/tests/test_reporting.py
- Command line
-
hf download hf://RL-MIND/DeciCo-RSI/tests/test_reporting.py
-
curl -L -o test_reporting.py https://huggingface.co/RL-MIND/DeciCo-RSI/resolve/main/tests/test_reporting.py
1.06 kB
| import importlib.util | |
| from pathlib import Path | |
| from common import write_json | |
| def test_human_report_never_presents_unmeasured_candidate_score(tmp_path): | |
| path=Path(__file__).resolve().parents[1]/'report_run.py' | |
| spec=importlib.util.spec_from_file_location('report_run',path) | |
| module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module) | |
| write_json(tmp_path/'history.json',[{'iteration':0,'operator':'harness','accepted':False, | |
| 'reason':'inner_no_candidate','selection_before':.5,'selection_after':.5, | |
| 'current_selection_primary_score':.51,'selection_comparison_status':'not_run', | |
| 'candidate_selection_primary_score':.99,'nested':{'status':'no_candidate', | |
| 'stop_reason':'candidate_limit','rejection_breakdown':{'proposal_invalid':3}}}]) | |
| result=module.report(tmp_path) | |
| row=result['iterations'][0] | |
| assert row['candidate_selection_balanced_group_score'] is None | |
| assert row['current_selection_balanced_group_score']==.51 | |
| assert row['rejection_breakdown']=={'proposal_invalid':3} | |