-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrequirements.txt
More file actions
79 lines (62 loc) · 4.32 KB
/
Copy pathrequirements.txt
File metadata and controls
79 lines (62 loc) · 4.32 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
# ── Web framework ─────────────────────────────────────────────────────────────
fastapi==0.115.0
uvicorn[standard]==0.30.6
pydantic==2.12.5 # typesafe-sdk (Jev backend) needs >=2.12
pydantic-settings==2.4.0
python-dotenv==1.0.1
# ── HTTP client (for Ollama proxy calls) ──────────────────────────────────────
httpx==0.27.2
# ── Database ──────────────────────────────────────────────────────────────────
asyncpg==0.29.0
# ── Cache ─────────────────────────────────────────────────────────────────────
redis[asyncio]==5.0.8
# ── Config ────────────────────────────────────────────────────────────────────
pyyaml==6.0.2
# ── CLI (eval pipeline) ───────────────────────────────────────────────────────
typer==0.12.5
rich==13.8.1 # pretty CLI output for eval scorecards
# ── ML / Evaluators ───────────────────────────────────────────────────────────
# PyTorch — platform notes:
# macOS (Apple Silicon): pip installs the MPS build by default (~400 MB).
# Linux / Docker: Dockerfile installs the CPU-only build (~900 MB)
# to avoid the default CUDA build (~2.5 GB).
torch==2.4.1
# HuggingFace
transformers==4.44.2
tokenizers==0.19.1
huggingface-hub==0.24.6
# Sentence Transformers (relevance + topic guardrail)
sentence-transformers==3.1.1
# Detoxify (toxicity scoring)
detoxify==0.5.2
# PII Detection
presidio-analyzer==2.2.355
presidio-anonymizer==2.2.355
spacy==3.7.6
# Model download — must match evaluators.pii.spacy_model in config.yaml:
# en_core_web_sm (~12 MB) — fast, but measurably misreads ordinary capitalized
# words as PERSON (see pii.py's _SENSITIVE_ENTITY_TYPES)
# en_core_web_md (~43 MB) — balanced
# en_core_web_lg (~700 MB) — most accurate; default, matches Dockerfile.api
# Run: python -m spacy download en_core_web_lg
# ONNX Runtime (for optimized CPU inference of NLI models)
onnxruntime==1.19.2
optimum==1.22.0 # HuggingFace → ONNX export; enables use_onnx: true in config
# Prompt Injection (no extra install — uses transformers pipeline)
# Model: deepset/deberta-v3-base-injection (downloaded at first run)
# ── Cloud LLM SDKs ────────────────────────────────────────────────────────────
openai>=1.50.0 # OpenAI / OpenAI-compatible provider
anthropic>=0.37.0 # Anthropic Claude provider
google-genai>=1.0.0 # Google Gemini provider (replaces deprecated google-generativeai)
typesafe-sdk>=0.7.2,<0.8 # Jev guardrail backend (pre-1.0: 0.7.0 broke serialization)
# ── Statistical analysis (v2 offline eval regression detection) ───────────────
scipy>=1.14.0 # Mann-Whitney U + Cohen's d; pure-Python fallback when absent
# ── Observability ──────────────────────────────────────────────────────────────
prometheus-client>=0.21.0 # /metrics Prometheus endpoint
python-json-logger>=2.0.7 # structured JSON logging for production
# OpenTelemetry tracing — opt-in via OTEL_EXPORTER_OTLP_ENDPOINT; a no-op tracer
# is used when unset, so these have zero runtime cost on an unconfigured deployment.
opentelemetry-api>=1.27.0
opentelemetry-sdk>=1.27.0
opentelemetry-exporter-otlp-proto-http>=1.27.0
opentelemetry-instrumentation-fastapi>=0.48b0