Download engines/code/vendor/pdl_bench_eval/replication/assets.py from Poindexter-Labs/Samples: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/datasets/Poindexter-Labs/Samples/resolve/main/engines/code/vendor/pdl_bench_eval/replication/assets.py
- Command line
-
hf download hf://datasets/Poindexter-Labs/Samples/engines/code/vendor/pdl_bench_eval/replication/assets.py
-
curl -L -o assets.py https://huggingface.co/datasets/Poindexter-Labs/Samples/resolve/main/engines/code/vendor/pdl_bench_eval/replication/assets.py
1.39 kB
| """The versioned reference assets the agent loop reads: prompts, tool schema, contract, profiles, schemas. | |
| All of them are byte copies from the PD RL Environment repository (see | |
| ``pdl_bench_eval/_vendor/SOURCE_MANIFEST.json``); nothing here is edited. | |
| """ | |
| from __future__ import annotations | |
| import json | |
| from functools import lru_cache | |
| from pathlib import Path | |
| import yaml | |
| ASSETS = Path(__file__).resolve().parent.parent / "_vendor" / "pd_rl_assets" | |
| def _yaml(rel: str) -> dict: | |
| return yaml.safe_load((ASSETS / rel).read_text()) | |
| def _json(rel: str) -> dict: | |
| return json.loads((ASSETS / rel).read_text()) | |
| def prompt(prompt_id: str) -> dict: | |
| return _yaml(f"prompts/{prompt_id}.yaml") | |
| def profile(profile_id: str) -> dict: | |
| return _yaml(f"profiles/{profile_id}.yaml") | |
| def contract(contract_id: str) -> dict: | |
| return _yaml(f"contracts/{contract_id}.yaml") | |
| def tools(tools_id: str) -> dict: | |
| return _yaml(f"contracts/{tools_id}.yaml") | |
| def trajectory_schema() -> dict: | |
| return _json("schemas/trajectory_event.schema.json") | |
| def record_schema() -> dict: | |
| return _json("schemas/episode_record.schema.json") | |
| def available() -> dict: | |
| return {kind: sorted(p.stem.replace(".schema", "") for p in (ASSETS / kind).iterdir()) | |
| for kind in ("prompts", "profiles", "contracts", "schemas")} | |