Text Classification
PEFT
lora
document-question-answering
structured-decisions
calibration
synthetic-evaluation
Instructions to use botp/Solomon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use botp/Solomon with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Download mlx/tests/test_budget.py from botp/Solomon: direct link, hf CLI and curl.
- Browser
- Download file 780 Bytes
-
https://huggingface.co/botp/Solomon/resolve/main/mlx/tests/test_budget.py
- Command line
-
hf download hf://botp/Solomon/mlx/tests/test_budget.py
-
curl -L -o test_budget.py https://huggingface.co/botp/Solomon/resolve/main/mlx/tests/test_budget.py
780 Bytes
| import json | |
| import pytest | |
| from solomon_mlx.budget import Budget | |
| def test_budget_reserves_before_dispatch_and_exhausts(tmp_path): | |
| path = tmp_path / "budget.json" | |
| budget = Budget(path, 20) | |
| with budget.reserve(15, "one"): | |
| assert json.loads(path.read_text())["entries"][0]["status"] == "reserved" | |
| with pytest.raises(RuntimeError), budget.reserve(1, "concurrent"): | |
| pass | |
| with pytest.raises(RuntimeError), budget.reserve(6, "too expensive"): | |
| pass | |
| def test_uncertain_dispatch_blocks_followups(tmp_path): | |
| budget = Budget(tmp_path / "budget.json") | |
| with pytest.raises(TimeoutError), budget.reserve(20, "uncertain"): | |
| raise TimeoutError() | |
| with pytest.raises(RuntimeError), budget.reserve(20, "retry"): | |
| pass | |