Download verifier_tree.py from xiaojie06/DrugResearchBench: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/xiaojie06/DrugResearchBench/resolve/main/verifier_tree.py
- Command line
-
hf download hf://xiaojie06/DrugResearchBench/verifier_tree.py
-
curl -L -o verifier_tree.py https://huggingface.co/xiaojie06/DrugResearchBench/resolve/main/verifier_tree.py
566 Bytes
| """Bind a complete restricted reference installation without exposing private source to the actor.""" | |
| from pathlib import Path | |
| from drb import load,require,sha,within | |
| def check_verifier(task,root): | |
| record=load(task/"oracle/authorized_installation.json") | |
| private=within(root,record["directory"]) | |
| for item in record["files"]: | |
| path=within(private,item["path"]) | |
| require(path.is_file() and path.stat().st_size==item["bytes"] and sha(path)==item["sha256"], | |
| "Frozen private reference changed: "+item["path"]) | |
| return private | |