Workflow to run ingest.py - #1
Conversation
|
Thanks Brian — your diagnosis was exactly right. I've pushed a fix to main that addresses both issues: Duplicate files — CI workflow — I've added The workflow also sets You can close this PR — the workflow is already in main. Feel free to pull and let me know if the local |
|
Thanks for what you have done. Alas, I was not able to run the ingest.py process either from a GH action or from a terminal window. Please let me know if I should be doing something different. |
|
On the terminal kill: The root pip install -e . # install package in editable mode (once)
python ingest.py # or: gsas-query --setup --html-onlyIf you prefer not to install from source, the package is now on PyPI: pip install gsas-query
gsas-query --setup --html-onlyThe Python 3.13 SIGKILL fix (setting On the CI runner shutdowns: The runner is being killed by OOM — even with CPU-only torch (~400 MB), loading PyTorch + sentence-transformers + ChromaDB + processing 129 HTML pages uses more than the 7 GB available on ubuntu-latest. I'm looking at switching to ChromaDB's built-in ONNX embedding function which skips PyTorch entirely (~200 MB vs ~2 GB). That will fix CI. Will push the change shortly. |
|
Update (v0.2.1): I've dropped PyTorch and sentence-transformers entirely. Embeddings now use ChromaDB's built-in ONNX runtime (~80 MB model download, no loky, no multiprocessing issues). This should fix the terminal kill. Steps to try now: # Pull latest and install from PyPI (or -e . from the repo)
git pull
pip install --upgrade gsas-query # installs v0.2.1
# Build the index (first run downloads the 80 MB ONNX model)
gsas-query --setup --html-only
# Verify it worked
gsas-query --statsIf you still see a kill, please share the full terminal output — it may be a plain OOM (model + chromadb loading ~1 GB total). In that case we can try On the CI ingest workflow: The auto-trigger has been disabled — chromadb pulls in grpcio, kubernetes, onnxruntime and the combined footprint OOMs the 7 GB ubuntu-latest runner. The workflow now only runs on manual dispatch. For building a distributable index, a self-hosted runner (or a local machine) is the right place. |
|
Update (v0.2.2) — root cause of the terminal kill found and fixed The process was hanging indefinitely (not crashing) due to a bug in A second bug caused a Verified end-to-end on Python 3.13: full ingest completes in ~3 minutes, 1747 chunks indexed from 84 HTML sources. pip install --upgrade gsas-query # installs v0.2.2
gsas-query --setup --reset --html-only
gsas-query --statsThe |
…-behavior Add llama-cpp-python backend with automatic priority selection
This is not yet working (see https://github.com/briantoby/Query-GSAS/actions/runs/28973420246/job/85974517585) but shows what I'd like to get working as a workflow and opening a PR gives you access.
I see that there are nearly duplicate files between the main directory and the gsas_query directory and it seems that files are being used from both places in ingest.py. Probably best to clean this up.