Skip to content

Fix GPU runbook: neural path must not import joblib - #36

Merged
professor3333 merged 1 commit into
mainfrom
fix/neural-imports
Nov 5, 2026
Merged

professor3333 merged 1 commit into
mainfrom
fix/neural-imports

Conversation

@professor3333

Copy link
Copy Markdown
Owner

Summary

  • The first Kaggle run stopped at its first experiment with ModuleNotFoundError: No module named 'joblib'. The transformer trainer imported training_hash / training_origins from the CRF module, which imports joblib, scikit-learn and python-crfsuite, and the runbook installs only the neural extra.
  • The two helpers move to triggermap/models/provenance.py, which has no learner dependencies. CRF and transformer both import them from there; outputs are unchanged.
  • New test: the neural training and prediction modules (CLI, trainer, extractor, experiment runner, registry, review policy, preprocessing) import with joblib, sklearn, pycrfsuite, spacy, fastapi, uvicorn and onnxruntime blocked. It fails without the fix with the same error.
  • run_neural.sh reuses an existing .venv-gpu on re-runs (--allow-existing).

Checks

  • ruff check, ruff format --check, mypy src/, pytest -m "not slow" (236 passed); shellcheck clean.

The transformer trainer imported its provenance helpers from the CRF
module, which imports joblib, so the GPU runbook (neural extra only)
failed at its first experiment. The helpers move to models/provenance.py.
A test imports the neural training and prediction modules with baseline
and serving packages blocked. Re-running the runbook reuses its venv.
@professor3333
professor3333 merged commit e0d370d into main Nov 5, 2026
2 checks passed
@professor3333
professor3333 deleted the fix/neural-imports branch November 5, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant