Download python_lora_dataset_builder/pipeline/source_checks.py from api-relay/sadASDasd: direct link, hf CLI and curl.
- Browser
- Download file 401 Bytes
-
https://huggingface.co/datasets/api-relay/sadASDasd/resolve/main/python_lora_dataset_builder/pipeline/source_checks.py
- Command line
-
hf download hf://datasets/api-relay/sadASDasd/python_lora_dataset_builder/pipeline/source_checks.py
-
curl -L -o source_checks.py https://huggingface.co/datasets/api-relay/sadASDasd/resolve/main/python_lora_dataset_builder/pipeline/source_checks.py
401 Bytes
| from __future__ import annotations | |
| # Dataset-level license/provenance review should be completed before a source | |
| # is processed. This per-record hook exists for future source metadata rules. | |
| def check_source_record(record: dict) -> tuple[bool, str | None]: | |
| if not record.get("instruction") and not record.get("output"): | |
| return False, "empty_instruction_and_output" | |
| return True, None | |