Diagnostic: print SPACES_ZERO_GPU env + canary marking status
Browse files
app.py
CHANGED
|
@@ -52,13 +52,25 @@ _gc_utils._json_schema_to_python_type = _safe_jstpt
|
|
| 52 |
# ──────────────────────────────────────────────────────────────────────────
|
| 53 |
|
| 54 |
|
| 55 |
-
# ─── ZeroGPU startup canary
|
|
|
|
|
|
|
|
|
|
| 56 |
import spaces # noqa: E402
|
| 57 |
|
|
|
|
|
|
|
| 58 |
|
| 59 |
@spaces.GPU(duration=1)
|
| 60 |
def _zerogpu_startup_canary() -> None:
|
| 61 |
return None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
# ──────────────────────────────────────────────────────────────────────────
|
| 63 |
|
| 64 |
|
|
|
|
| 52 |
# ──────────────────────────────────────────────────────────────────────────
|
| 53 |
|
| 54 |
|
| 55 |
+
# ─── ZeroGPU startup canary + diagnostics ─────────────────────────────────
|
| 56 |
+
print(f"[kpaa-backend] SPACES_ZERO_GPU={os.environ.get('SPACES_ZERO_GPU')!r}", flush=True)
|
| 57 |
+
print(f"[kpaa-backend] SPACE_ID={os.environ.get('SPACE_ID')!r}", flush=True)
|
| 58 |
+
|
| 59 |
import spaces # noqa: E402
|
| 60 |
|
| 61 |
+
print(f"[kpaa-backend] spaces.Config.zero_gpu={spaces.zero.config.Config.zero_gpu}", flush=True)
|
| 62 |
+
|
| 63 |
|
| 64 |
@spaces.GPU(duration=1)
|
| 65 |
def _zerogpu_startup_canary() -> None:
|
| 66 |
return None
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
print(
|
| 70 |
+
f"[kpaa-backend] canary marked? "
|
| 71 |
+
f"{getattr(_zerogpu_startup_canary, 'zerogpu', 'NO')}",
|
| 72 |
+
flush=True,
|
| 73 |
+
)
|
| 74 |
# ──────────────────────────────────────────────────────────────────────────
|
| 75 |
|
| 76 |
|