Datasets:
Download code/robohome/src/engine/source/packages/task_agent/skills.py from RoboParty/RoboHome: direct link, hf CLI and curl.
- Browser
- Download file 821 Bytes
-
https://huggingface.co/datasets/RoboParty/RoboHome/resolve/86ffa4ecc1047bb404fdc283987bd22cbc259a96/code/robohome/src/engine/source/packages/task_agent/skills.py
- Command line
-
hf download hf://datasets/RoboParty/RoboHome@86ffa4ecc1047bb404fdc283987bd22cbc259a96/code/robohome/src/engine/source/packages/task_agent/skills.py
-
curl -L -o skills.py https://huggingface.co/datasets/RoboParty/RoboHome/resolve/86ffa4ecc1047bb404fdc283987bd22cbc259a96/code/robohome/src/engine/source/packages/task_agent/skills.py
821 Bytes
| from __future__ import annotations | |
| import os | |
| from pathlib import Path | |
| import yaml # type: ignore[import-untyped] | |
| from packages.schemas.models import SkillSpec | |
| def default_skill_registry(path: Path | None = None) -> dict[str, SkillSpec]: | |
| declared = path or Path( | |
| os.environ.get("RHG_SKILL_CATALOG", "configs/task_agent/skills_v1.yaml") | |
| ) | |
| if not declared.is_absolute() and not declared.is_file(): | |
| declared = Path(__file__).resolve().parents[2] / declared | |
| payload = yaml.safe_load(declared.read_text(encoding="utf-8")) | |
| skills = [SkillSpec.model_validate(item) for item in payload["skills"]] | |
| registry = {item.skill_id: item for item in skills} | |
| if len(registry) != len(skills): | |
| raise ValueError(f"skill catalog contains duplicate IDs: {declared}") | |
| return registry | |