Instructions to use XXXpilar/Fastfill-test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use XXXpilar/Fastfill-test with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download code/fastfill/v2/tests/test_bounded_io.py from XXXpilar/Fastfill-test: direct link, hf CLI and curl.
- Browser
- Download file 709 Bytes
-
https://huggingface.co/XXXpilar/Fastfill-test/resolve/main/code/fastfill/v2/tests/test_bounded_io.py
- Command line
-
hf download hf://XXXpilar/Fastfill-test/code/fastfill/v2/tests/test_bounded_io.py
-
curl -L -o test_bounded_io.py https://huggingface.co/XXXpilar/Fastfill-test/resolve/main/code/fastfill/v2/tests/test_bounded_io.py
709 Bytes
| import json | |
| import pytest | |
| from fastfill.v2.io import read_samples | |
| from fastfill.v2.tests.test_execution import sample | |
| def test_bounded_read_does_not_parse_unrequested_tail(tmp_path): | |
| path = tmp_path / "train.jsonl" | |
| path.write_text(json.dumps(sample()) + "\nnot-json-outside-selected-prefix\n") | |
| rows = read_samples(path, training=True, max_samples=1) | |
| assert len(rows) == 1 | |
| with pytest.raises(json.JSONDecodeError): | |
| read_samples(path) | |
| def test_bounded_read_requires_positive_integer(tmp_path, limit): | |
| with pytest.raises(ValueError, match="positive integer"): | |
| read_samples(tmp_path / "absent", max_samples=limit) | |