Every stage, in order, with the exact command and what it produces. Paths reflect
the build host (/home/jme/scratch_ptf working dir, ~/Downloads for inputs and
deliverables). Adjust the config block at the top of each script for another host.
| venv | Python | Purpose |
|---|---|---|
~/.venvs/torch-pascal |
3.12 | GPU inference (torch cu126, transformers 4.57) — stages 01, 02, 08 |
~/poster-bot/.venv |
3.12 | CPU: httpx (DeepSeek) + sentence-transformers + fairly — stages 04–07 |
GPU is a GTX 1070 (Pascal, sm_61): run models in fp32 (fp16 is 1/64 rate).
export DEEPSEEK_API=... before the DeepSeek stages (store it in a chmod-600 file,
not inline). HF_HUB_OFFLINE=1 after models are cached.
~/Downloads/posters-science-export.zip— 31,417 posters, DataCite 4.7 NDJSON.~/Downloads/biomarker_list.csv— BiomarkerKB export, 8,228 known entities + conditions.~/Downloads/posters.dump— pgvector DB dump (used by the separate poster-bot chat app).
HF_HUB_OFFLINE=1 ~/.venvs/torch-pascal/bin/python pipeline/01_classify_fields.pyFilters to publicationYear >= 2024 (11,028), runs paper-to-field (title +
description + content, 384-token cap) → annotations.jsonl (field, domain, top-3)
cls_embeddings.npy+ids.json.
~/.venvs/torch-pascal/bin/python pipeline/02_assign_topics.pyFetches the OpenAlex topic hierarchy (4,516 topics), validates the
topic_embeddings row order (nearest-topic field vs classifier field; picks the
ordering above the agreement floor), assigns each poster a topic/subfield →
topic_assign.json.
~/.venvs/torch-pascal/bin/python pipeline/03_merge_annotations.pyFolds field/domain/topic into every record; writes posters-2024plus-annotated.ndjson,
the Health+Life subset, and posters-2024plus.manifest.json (counts by
domain/field/subfield).
~/poster-bot/.venv/bin/python pipeline/04_extract_biomarkers.pyHealth+Life posters only. Full untruncated text → broad biomarker list
(kind/status/role/evidence) → deepseek_biomarkers.jsonl. ~47% carry ≥1 biomarker.
~/poster-bot/.venv/bin/python pipeline/05_enrich_catalogue.pyRe-runs the biomarker-positive posters for the rich per-marker record (acronym,
synonyms, conditions, specimen, role, direction, method, population) + poster
metadata/year → deepseek_catalogue.jsonl.
HF_HUB_OFFLINE=1 ~/poster-bot/.venv/bin/python pipeline/06_assemble_catalogue.pyCollapses names across the three tiers (char → fairly semantic → alias dict),
matches each canonical entity vs BiomarkerKB (lib/match_known.py) →
biomarkers-counts.csv + biomarker-catalogue.csv + biomarkers-index.json.
~/poster-bot/.venv/bin/python pipeline/07_seeded_pass.pyFull text seeded with our finds + their match status; pulls standard IDs
(HGNC/UniProt/CHEBI/Entrez) + ontology-tagged conditions, focusing on the none
(candidate-novel) set → deepseek_seeded.jsonl. Re-match with these IDs to split
genuinely-novel from named-differently.
~/poster-bot/.venv/bin/python pipeline/09_extract_conditions.py
~/poster-bot/.venv/bin/python pipeline/10_condition_frequency.py
~/poster-bot/.venv/bin/python pipeline/12_rematch_extended.py # BiomarkerKB+MarkerDB+PRGdb
~/poster-bot/.venv/bin/python pipeline/13_classify_none.py # deterministic cascade
DEEPSEEK_API=... ~/poster-bot/.venv/bin/python pipeline/13b_adjudicate_none.py
~/poster-bot/.venv/bin/python pipeline/14_mine_known_uncatalogued.py
~/poster-bot/.venv/bin/python pipeline/11_master_record.py # per-poster join- DeepSeek stages are resumable — re-running skips ids already in the output.
- DeepSeek and GPU stages are independent workloads and can run concurrently.
- Known-DB matching is heuristic for
partial;exactandnoneare reliable. The seeded pass (07) exists to makenonetrustworthy via standard identifiers.