-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
86 lines (77 loc) · 2.39 KB
/
Copy pathpyproject.toml
File metadata and controls
86 lines (77 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
[project]
name = "tinyrouter"
version = "0.1.0"
description = "A fine-tuned local intent router for CLINC150, calibrated and cascaded to an LLM only when unsure."
readme = "README.md"
license = { text = "MIT" }
authors = [{ name = "Bo-Yu Chen" }]
requires-python = "==3.12.*"
# Exact pins for every direct dependency. uv.lock pins the transitive set.
dependencies = [
"accelerate==1.15.0",
"datasets==5.0.1",
"huggingface-hub==1.32.0",
"numpy==2.5.3",
"pyarrow==25.0.1",
"pyyaml==6.0.3",
"scikit-learn==1.9.1",
"torch==2.14.0",
"transformers==5.17.0",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/tinyrouter"]
[dependency-groups]
# The Claude Haiku baseline and cascade fallback. Not installed by
# `uv sync`; `uv sync --group llm` installs it, and `make llm` / `make
# llm-smoke` ask uv for it. tinyrouter/llm.py imports it only at call time.
# CI installs it: the retry and redaction tests raise the SDK's real
# exception classes at a fake client (they skip where it is missing).
llm = [
"anthropic==1.8.0",
]
dev = [
"pytest==9.1.1",
"ruff==0.16.8",
# tests/test_metrics.py checks wilson_interval against scipy. It is also
# a scikit-learn dependency, but a test must not rely on that.
"scipy==1.18.1",
]
# ONNX export and ONNX Runtime (RQ7; scripts/export_onnx.py). Not installed
# by `uv sync` or in CI; `uv sync --group onnx` installs it.
onnx = [
"onnx==1.23.0",
"onnxruntime==1.30.0",
"onnxscript==0.7.2",
]
# `make figures` (results/figures/*.png). Not installed by `uv sync`; CI's
# test job installs it so the figure tests run there.
figures = [
"matplotlib==3.11.2",
]
[tool.uv]
default-groups = ["dev"]
[tool.uv.sources]
# CPU-only torch wheels on Linux (CI runners have no GPU; the default PyPI
# wheel pulls several GB of CUDA libraries). macOS resolves the normal
# PyPI wheel (MPS included).
torch = [
{ index = "pytorch-cpu", marker = "sys_platform == 'linux'" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.ruff]
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"network: downloads from the Hugging Face Hub or the pinned clinc/oos-eval commit on GitHub",
]
addopts = "-m 'not network'"