Spaces:
Sleeping
Sleeping
Fix build: pin pydantic 2.12.5 for gradio[mcp] compatibility
Browse files- README.md +15 -0
- requirements.txt +8 -1
README.md
CHANGED
|
@@ -601,6 +601,15 @@ constraint, and the constraint won.
|
|
| 601 |
If a CPU tier becomes available again, this Space should move to it. Nothing
|
| 602 |
would need to change but the setting.
|
| 603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 604 |
### How ZeroGPU is actually selected
|
| 605 |
|
| 606 |
**In the Space's Settings UI, not in this YAML header.** The
|
|
@@ -690,6 +699,12 @@ Stated rather than smoothed over:
|
|
| 690 |
numerical work beyond `.predict()` — but it means the Space is not
|
| 691 |
byte-identical to the environment every reported number was produced in. **All
|
| 692 |
headline results come from the research environment, never from this Space.**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 693 |
- **The console is not the evidence.** It renders artifacts built by
|
| 694 |
`src/pipelines/build_app_artifacts.py`. Reproducing the numbers means running
|
| 695 |
the pipeline, not reading the demo.
|
|
|
|
| 601 |
If a CPU tier becomes available again, this Space should move to it. Nothing
|
| 602 |
would need to change but the setting.
|
| 603 |
|
| 604 |
+
**One thing a careful reader will find in the container, so it is stated here
|
| 605 |
+
rather than left to look concealed: `torch` IS installed in this image.** The
|
| 606 |
+
ZeroGPU builder appends it to the install command itself — the observed build
|
| 607 |
+
step is `pip install -r requirements.txt "torch<=2.11.0" gradio[oauth,mcp]
|
| 608 |
+
"uvicorn" "websockets" spaces==0.51.1`. It is not in `requirements.txt`, no
|
| 609 |
+
module in this repository imports it, and no model uses it. The claim being
|
| 610 |
+
made is that *this project* introduces no GPU dependency, not that the platform
|
| 611 |
+
image contains none.
|
| 612 |
+
|
| 613 |
### How ZeroGPU is actually selected
|
| 614 |
|
| 615 |
**In the Space's Settings UI, not in this YAML header.** The
|
|
|
|
| 699 |
numerical work beyond `.predict()` — but it means the Space is not
|
| 700 |
byte-identical to the environment every reported number was produced in. **All
|
| 701 |
headline results come from the research environment, never from this Space.**
|
| 702 |
+
- **pydantic 2.12.5 here vs 2.13.4 in the lock file.** Forced: the builder
|
| 703 |
+
installs `gradio[oauth,mcp]`, whose `mcp` extra caps pydantic at 2.12.5, and
|
| 704 |
+
the first deploy failed with `ResolutionImpossible` on exactly this. Verified
|
| 705 |
+
safe before changing — no pydantic object is pickled inside any shipped model,
|
| 706 |
+
so the package is needed only to make `src.utils.config` importable during
|
| 707 |
+
unpickling, and that import was confirmed under 2.12.5 in a clean venv.
|
| 708 |
- **The console is not the evidence.** It renders artifacts built by
|
| 709 |
`src/pipelines/build_app_artifacts.py`. Reproducing the numbers means running
|
| 710 |
the pipeline, not reading the demo.
|
requirements.txt
CHANGED
|
@@ -33,7 +33,14 @@ joblib==1.5.3
|
|
| 33 |
pyarrow==25.0.0 # reads app/assets/demo_cells.parquet
|
| 34 |
|
| 35 |
# --- Config schema used by the pickled selectors ------------------------------
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
pyyaml==6.0.3
|
| 38 |
|
| 39 |
# --- Figures ------------------------------------------------------------------
|
|
|
|
| 33 |
pyarrow==25.0.0 # reads app/assets/demo_cells.parquet
|
| 34 |
|
| 35 |
# --- Config schema used by the pickled selectors ------------------------------
|
| 36 |
+
# DIVERGES FROM requirements.lock.txt (2.13.4), and the divergence is forced.
|
| 37 |
+
# The Spaces builder installs `gradio[oauth,mcp]`, whose `mcp` extra requires
|
| 38 |
+
# pydantic<=2.12.5, so pinning 2.13.4 makes the build fail with
|
| 39 |
+
# ResolutionImpossible. Verified safe: no pydantic object is pickled inside any
|
| 40 |
+
# shipped model -- pydantic is needed only so `src.utils.config` is importable
|
| 41 |
+
# when joblib unpickles the selectors -- and src/utils/config.py was confirmed
|
| 42 |
+
# to import cleanly under 2.12.5 in a clean venv before this pin was changed.
|
| 43 |
+
pydantic==2.12.5
|
| 44 |
pyyaml==6.0.3
|
| 45 |
|
| 46 |
# --- Figures ------------------------------------------------------------------
|