Spaces:
Sleeping
Sleeping
Download data_studio/task_extensions.py from KPrashanth/rachana-data-studio: direct link, hf CLI and curl.
- Browser
- Download file 664 Bytes
-
https://huggingface.co/spaces/KPrashanth/rachana-data-studio/resolve/main/data_studio/task_extensions.py
- Command line
-
hf download hf://spaces/KPrashanth/rachana-data-studio/data_studio/task_extensions.py
-
curl -L -o task_extensions.py https://huggingface.co/spaces/KPrashanth/rachana-data-studio/resolve/main/data_studio/task_extensions.py
664 Bytes
| from __future__ import annotations | |
| from typing import Any | |
| TASK_EXTENSION_REQUIREMENTS = frozenset( | |
| { | |
| "rubric", | |
| "failure_taxonomy", | |
| "sampling_policy", | |
| "cleaner_policy", | |
| "audit_policy", | |
| "export_schema", | |
| } | |
| ) | |
| def validate_task_extension(task: str, artifacts: dict[str, Any]) -> dict[str, Any]: | |
| missing = sorted(requirement for requirement in TASK_EXTENSION_REQUIREMENTS if not artifacts.get(requirement)) | |
| if missing: | |
| raise ValueError(f"Task extension {task} is blocked; missing artifacts: {missing}") | |
| return {"task": task, "status": "ready_for_controlled_pilot", "artifacts": artifacts} | |