The SafetyCheck resident art-pipe worker fails to start with ModuleNotFoundError: No module named 'torch', and because a warmup fault is treated as a non-recoverable "pre-ready config error," it takes down the entire ArtPipeProcessor host, which then crash-loops (observed 24× Fatal: terminated unexpectedly + 23× Hosting failed to start in a 24h window). This also produces a burst of TaskCanceledExceptions as the host is torn down mid-startup.
Evidence (Seq)
[Error] Resident worker FAULTED (no automatic restart — pre-ready failures are config errors):
Worker for model 'SafetyCheck' failed during startup: Traceback (most recent call last):
File "/opt/art_pipe/src/artpipe/worker.py", line 402, in _serve_main
backend.warmup(on_progress=lambda p, m, **kw: log.info(
File "/opt/art_pipe/src/artpipe/models/safety_check.py", line 155, in warmup
self._ensure_model(on_progress)
File "/opt/art_pipe/src/artpipe/models/safety_check.py", line 130, in _ensure_model
import torch
ModuleNotFoundError: No module named 'torch'
Source: SpikerSoft.EventHandlers.ArtPipeProcessor.Services.ResidentArtPipeStageExecutor
Followed by [Fatal] SpikerSoft.EventHandlers.ArtPipeProcessor terminated unexpectedly + [Error] Hosting failed to start.
Two problems here
Provisioning gap: the SafetyCheck model's resident venv has no torch. This is the same family as #432 (art_pipe model venvs missing requirements) but a different model + different missing package + the Resident executor path — so #432's fixes (install cloned-repo requirements, python3.10) don't obviously cover it. safety_check.py:_ensure_model imports torch directly, so its venv (or the worker base image) must provide torch. Not a CUDA-version issue like #426 — torch is entirely absent.
Reliability / blast radius: a single model's pre-ready fault crashes the whole ArtPipeProcessor host and it crash-loops with no isolation. One misprovisioned model should not take down the host / all other resident models. Consider quarantining a faulted model (mark it unavailable, keep the host up) instead of terminating the process.
Impact
The SafetyCheck stage — the content-safety gate — cannot run. Depending on pipeline wiring this either blocks assets or lets them through ungated.
ArtPipeProcessor crash-loops, disrupting any resident-model stages it hosts.
Proposed fix
Ensure torch is installed in the SafetyCheck resident venv / worker image (align with the cu128 torch index used elsewhere per #426). Verify python -c "import torch" succeeds in that venv during provisioning.
Add fault isolation so a single model warmup failure degrades that model only, not the whole host (log + mark unavailable, don't terminate).
Verify
# in the SafetyCheck worker env
python -c "import torch; print(torch.__version__)"
# Seq: no new 'Resident worker FAULTED' / 'ArtPipeProcessor terminated unexpectedly' after redeploy
Related: #432, #426, #455 (art_pipe model provisioning family).
Filed proactively by automated health check (Seq centralized error audit).
## Summary
The **SafetyCheck** resident art-pipe worker fails to start with `ModuleNotFoundError: No module named 'torch'`, and because a warmup fault is treated as a non-recoverable "pre-ready config error," it **takes down the entire `ArtPipeProcessor` host, which then crash-loops** (observed 24× `Fatal: terminated unexpectedly` + 23× `Hosting failed to start` in a 24h window). This also produces a burst of `TaskCanceledException`s as the host is torn down mid-startup.
## Evidence (Seq)
```
[Error] Resident worker FAULTED (no automatic restart — pre-ready failures are config errors):
Worker for model 'SafetyCheck' failed during startup: Traceback (most recent call last):
File "/opt/art_pipe/src/artpipe/worker.py", line 402, in _serve_main
backend.warmup(on_progress=lambda p, m, **kw: log.info(
File "/opt/art_pipe/src/artpipe/models/safety_check.py", line 155, in warmup
self._ensure_model(on_progress)
File "/opt/art_pipe/src/artpipe/models/safety_check.py", line 130, in _ensure_model
import torch
ModuleNotFoundError: No module named 'torch'
```
Source: `SpikerSoft.EventHandlers.ArtPipeProcessor.Services.ResidentArtPipeStageExecutor`
Followed by `[Fatal] SpikerSoft.EventHandlers.ArtPipeProcessor terminated unexpectedly` + `[Error] Hosting failed to start`.
## Two problems here
1. **Provisioning gap:** the SafetyCheck model's resident venv has no `torch`. This is the same *family* as #432 (art_pipe model venvs missing requirements) but a different model + different missing package + the **Resident** executor path — so #432's fixes (install cloned-repo requirements, python3.10) don't obviously cover it. `safety_check.py:_ensure_model` imports `torch` directly, so its venv (or the worker base image) must provide torch. Not a CUDA-version issue like #426 — torch is entirely absent.
2. **Reliability / blast radius:** a single model's pre-ready fault crashes the **whole ArtPipeProcessor host** and it crash-loops with no isolation. One misprovisioned model should not take down the host / all other resident models. Consider quarantining a faulted model (mark it unavailable, keep the host up) instead of terminating the process.
## Impact
- The **SafetyCheck** stage — the content-safety gate — cannot run. Depending on pipeline wiring this either blocks assets or lets them through ungated.
- ArtPipeProcessor crash-loops, disrupting any resident-model stages it hosts.
## Proposed fix
- Ensure `torch` is installed in the SafetyCheck resident venv / worker image (align with the cu128 torch index used elsewhere per #426). Verify `python -c "import torch"` succeeds in that venv during provisioning.
- Add fault isolation so a single model warmup failure degrades that model only, not the whole host (log + mark unavailable, don't terminate).
## Verify
```
# in the SafetyCheck worker env
python -c "import torch; print(torch.__version__)"
# Seq: no new 'Resident worker FAULTED' / 'ArtPipeProcessor terminated unexpectedly' after redeploy
```
Related: #432, #426, #455 (art_pipe model provisioning family).
---
_Filed proactively by automated health check (Seq centralized error audit)._
Upstream root cause confirmed from Seq Warnings: ServeWorkerProcessFactory logs 'Model venv python not found at /opt/art_pipe/models/SafetyCheck/venv/bin/python; falling back to python3. Bootstrap the venv (#357).' So the SafetyCheck resident venv was never bootstrapped -> the worker runs under the system python3, which has no torch -> the ModuleNotFoundError. Fix ties to #357 (venv bootstrap): ensure the SafetyCheck model venv is created/provisioned (with torch) rather than silently falling back to system python3.
Upstream root cause confirmed from Seq Warnings: `ServeWorkerProcessFactory` logs 'Model venv python not found at /opt/art_pipe/models/SafetyCheck/venv/bin/python; falling back to python3. Bootstrap the venv (#357).' So the SafetyCheck resident venv was never bootstrapped -> the worker runs under the system python3, which has no torch -> the ModuleNotFoundError. Fix ties to #357 (venv bootstrap): ensure the SafetyCheck model venv is created/provisioned (with torch) rather than silently falling back to system python3.
Provisioning half fixed in spikersoft-artpipe PR #10: SafetyCheck's install.pip never listed torch — transformers treats it as optional and, uniquely among the models, SafetyCheck vendors no repo whose requirements pull it in, so the venv legitimately had no torch despite the manifest's cu128 torch_index_url. torch is now declared (regression-asserted in test_manifest_is_valid). OPS after merge: re-run the SafetyCheck venv bootstrap on the GPU host — merging alone doesn't heal the existing venv. — Reliability half (blast radius) findings, backend-side: the executor's eager warmup deliberately swallows the fault (SetFault, jobs fail fast) and ResidentWorkerHealthCheck reports it, so the crash-loop is NOT the warmup itself. Suspects for the 'Hosting failed to start' + Fatal pairs each boot: (a) BackgroundService default StopHost behavior — SafetyCheckRpcConsumer.ExecuteAsync rethrows fatal Rabbit wiring errors, which stops the whole host; (b) ResidentGpuLeaseHolder.StartAsync's blocking AcquireAsync on restart racing the crashed instance's still-held resident lease (released on shutdown only) — an acquire failure during host start produces exactly 'Hosting failed to start'. Confirming needs the Seq exception detail on the Hosting-failed events; suggested fixes once confirmed: HostOptions.BackgroundServiceExceptionBehavior/retry loop in the RPC consumer, and a bounded retry-with-backoff (or takeover of the stale lease by holder identity) in the lease holder. Leaving open for the reliability half + venv re-bootstrap.
Provisioning half fixed in spikersoft-artpipe PR #10: SafetyCheck's install.pip never listed torch — transformers treats it as optional and, uniquely among the models, SafetyCheck vendors no repo whose requirements pull it in, so the venv legitimately had no torch despite the manifest's cu128 torch_index_url. torch is now declared (regression-asserted in test_manifest_is_valid). OPS after merge: re-run the SafetyCheck venv bootstrap on the GPU host — merging alone doesn't heal the existing venv. — Reliability half (blast radius) findings, backend-side: the executor's eager warmup deliberately swallows the fault (SetFault, jobs fail fast) and ResidentWorkerHealthCheck reports it, so the crash-loop is NOT the warmup itself. Suspects for the 'Hosting failed to start' + Fatal pairs each boot: (a) BackgroundService default StopHost behavior — SafetyCheckRpcConsumer.ExecuteAsync rethrows fatal Rabbit wiring errors, which stops the whole host; (b) ResidentGpuLeaseHolder.StartAsync's blocking AcquireAsync on restart racing the crashed instance's still-held resident lease (released on shutdown only) — an acquire failure during host start produces exactly 'Hosting failed to start'. Confirming needs the Seq exception detail on the Hosting-failed events; suggested fixes once confirmed: HostOptions.BackgroundServiceExceptionBehavior/retry loop in the RPC consumer, and a bounded retry-with-backoff (or takeover of the stale lease by holder identity) in the lease holder. Leaving open for the reliability half + venv re-bootstrap.
Reliability half fixed in spikersoft-backend PR #232 — both triage suspects confirmed and addressed: (a) SafetyCheckRpcConsumer now retries transport wiring with backoff instead of rethrowing into BackgroundServiceExceptionBehavior.StopHost; (b) ResidentGpuLeaseHolder waits-and-retries the resident acquire inside StartAsync instead of crash-looping host start against a crashed predecessor's still-held lease. 3 regression tests incl. the load-bearing 'ExecuteTask completes unfaulted under persistent wiring failure'. Remaining on this ticket after merge: the ops verify that the SafetyCheck venv re-bootstrap took on the GPU host (provisioning half, artpipe PR #10).
Reliability half fixed in **spikersoft-backend PR #232** — both triage suspects confirmed and addressed: (a) SafetyCheckRpcConsumer now retries transport wiring with backoff instead of rethrowing into BackgroundServiceExceptionBehavior.StopHost; (b) ResidentGpuLeaseHolder waits-and-retries the resident acquire inside StartAsync instead of crash-looping host start against a crashed predecessor's still-held lease. 3 regression tests incl. the load-bearing 'ExecuteTask completes unfaulted under persistent wiring failure'. Remaining on this ticket after merge: the ops verify that the SafetyCheck venv re-bootstrap took on the GPU host (provisioning half, artpipe PR #10).
Board-sweep closing on merged evidence: reliability half in backend #232 (consumer retry + lease-holder wait); the missing-torch half is fixed definitionally by the baked SafetyCheck image cutover (infra #52, deployed 1/1 per #517). Reopen if the crash-loop signature reappears.
Board-sweep closing on merged evidence: reliability half in backend #232 (consumer retry + lease-holder wait); the missing-torch half is fixed definitionally by the baked SafetyCheck image cutover (infra #52, deployed 1/1 per #517). Reopen if the crash-loop signature reappears.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The SafetyCheck resident art-pipe worker fails to start with
ModuleNotFoundError: No module named 'torch', and because a warmup fault is treated as a non-recoverable "pre-ready config error," it takes down the entireArtPipeProcessorhost, which then crash-loops (observed 24×Fatal: terminated unexpectedly+ 23×Hosting failed to startin a 24h window). This also produces a burst ofTaskCanceledExceptions as the host is torn down mid-startup.Evidence (Seq)
Source:
SpikerSoft.EventHandlers.ArtPipeProcessor.Services.ResidentArtPipeStageExecutorFollowed by
[Fatal] SpikerSoft.EventHandlers.ArtPipeProcessor terminated unexpectedly+[Error] Hosting failed to start.Two problems here
torch. This is the same family as #432 (art_pipe model venvs missing requirements) but a different model + different missing package + the Resident executor path — so #432's fixes (install cloned-repo requirements, python3.10) don't obviously cover it.safety_check.py:_ensure_modelimportstorchdirectly, so its venv (or the worker base image) must provide torch. Not a CUDA-version issue like #426 — torch is entirely absent.Impact
Proposed fix
torchis installed in the SafetyCheck resident venv / worker image (align with the cu128 torch index used elsewhere per #426). Verifypython -c "import torch"succeeds in that venv during provisioning.Verify
Related: #432, #426, #455 (art_pipe model provisioning family).
Filed proactively by automated health check (Seq centralized error audit).
Upstream root cause confirmed from Seq Warnings:
ServeWorkerProcessFactorylogs 'Model venv python not found at /opt/art_pipe/models/SafetyCheck/venv/bin/python; falling back to python3. Bootstrap the venv (#357).' So the SafetyCheck resident venv was never bootstrapped -> the worker runs under the system python3, which has no torch -> the ModuleNotFoundError. Fix ties to #357 (venv bootstrap): ensure the SafetyCheck model venv is created/provisioned (with torch) rather than silently falling back to system python3.Provisioning half fixed in spikersoft-artpipe PR #10: SafetyCheck's install.pip never listed torch — transformers treats it as optional and, uniquely among the models, SafetyCheck vendors no repo whose requirements pull it in, so the venv legitimately had no torch despite the manifest's cu128 torch_index_url. torch is now declared (regression-asserted in test_manifest_is_valid). OPS after merge: re-run the SafetyCheck venv bootstrap on the GPU host — merging alone doesn't heal the existing venv. — Reliability half (blast radius) findings, backend-side: the executor's eager warmup deliberately swallows the fault (SetFault, jobs fail fast) and ResidentWorkerHealthCheck reports it, so the crash-loop is NOT the warmup itself. Suspects for the 'Hosting failed to start' + Fatal pairs each boot: (a) BackgroundService default StopHost behavior — SafetyCheckRpcConsumer.ExecuteAsync rethrows fatal Rabbit wiring errors, which stops the whole host; (b) ResidentGpuLeaseHolder.StartAsync's blocking AcquireAsync on restart racing the crashed instance's still-held resident lease (released on shutdown only) — an acquire failure during host start produces exactly 'Hosting failed to start'. Confirming needs the Seq exception detail on the Hosting-failed events; suggested fixes once confirmed: HostOptions.BackgroundServiceExceptionBehavior/retry loop in the RPC consumer, and a bounded retry-with-backoff (or takeover of the stale lease by holder identity) in the lease holder. Leaving open for the reliability half + venv re-bootstrap.
Reliability half fixed in spikersoft-backend PR #232 — both triage suspects confirmed and addressed: (a) SafetyCheckRpcConsumer now retries transport wiring with backoff instead of rethrowing into BackgroundServiceExceptionBehavior.StopHost; (b) ResidentGpuLeaseHolder waits-and-retries the resident acquire inside StartAsync instead of crash-looping host start against a crashed predecessor's still-held lease. 3 regression tests incl. the load-bearing 'ExecuteTask completes unfaulted under persistent wiring failure'. Remaining on this ticket after merge: the ops verify that the SafetyCheck venv re-bootstrap took on the GPU host (provisioning half, artpipe PR #10).
Board-sweep closing on merged evidence: reliability half in backend #232 (consumer retry + lease-holder wait); the missing-torch half is fixed definitionally by the baked SafetyCheck image cutover (infra #52, deployed 1/1 per #517). Reopen if the crash-loop signature reappears.