- Split the original local pipeline into
backend/andfrontend/projects while preserving the PDF -> GROBID/LightOCR -> JSON-LD ModelCard flow - Added Poetry environments, Dockerfiles,
.dockerignorefiles, and Docker Compose services for Ollama/model init, GROBID, RabbitMQ, backend, worker, and frontend - Added FastAPI job endpoints:
POST /job/launch-jobandGET /job/job-status/{job_id}with persistedstatus.jsonfiles underDATA_DIR/jobs. - Added RabbitMQ job publishing and a worker with dummy mode for smoke tests and real
PDFHandlermode for full pipeline runs - Moved backend code to package-style imports and environment-driven config, including shared
DATA_DIRsupport for Docker bind mounts. - Hardened the real worker path with 600s external timeouts, explicit PDF/GROBID/OCR failures, corrected dataset extraction inputs, and worker-visible
PDFHandlerprogress logs - Made LPWC dataset URI checks degrade to generated fallback URIs when SPARQL/network/SSL requests fail.
- Added backend/frontend
.dockerignorefiles and kept only a small runtime data sample - Updated README to describe the Docker-first workflow and current project structure
- Added
pipeline_stageto job status responses so the frontend can show the active pipeline step and LightOCR page progress. - Reused existing generated ModelCards for already processed arXiv papers instead of enqueueing/rerunning the full pipeline.
- Treated invalid cached ModelCard JSON as a cache miss so the worker can regenerate the paper instead of failing immediately.
- Changed the frontend job panel to auto-refresh active jobs and show the returned JSON-LD ModelCard inline for copying.
- Added a Streamlit API client configured by
P2MC_API_URLto submit arXiv URLs toPOST /job/launch-job - Connected the main Streamlit form to FastAPI job launch and display the queued job ID, arXiv ID, and initial status
- Added manual job status refresh in Streamlit, including status metadata, errors, and generated XML/OCR previews when completed
- Added
GET /job/jobsand viewable XML/OCR content throughGET /job/{job_id}/artifacts/{artifact_name}, plus a Streamlit Jobs page to browse previous file-backed jobs - Configured the frontend Compose service to call the backend through the Docker network
- Reduced worker peak memory by keeping
PDFHandlerinitialized withSciPdfParseronly, instead of holding LightOCR and ModelCard generation models for the whole worker lifetime - Changed LightOCR processing to load
LightOcrParseronly during OCR, skip loading it when the OCR JSON already exists, and release it before ModelCard generation starts - Reduced LightOCR's default image budget from
1540to1024and token budget from8192to1024to avoid Docker OOM kills during local real-worker runs - Added
P2MC_LIGHTOCR_TARGET_LONGEST,P2MC_LIGHTOCR_MAX_NEW_TOKENS, andP2MC_LIGHTOCR_MODEL_IDso LightOCR quality/memory can be tuned per machine without rebuilding the image - Logged the active LightOCR model and budgets at startup so worker logs show which memory profile is actually running
- Routed LightOCR page progress through the worker logger so
docker compose logs -f p2mc-workershows render/OCR start, finish, detected table counts, and total tables per PDF - Loaded LightOCR with
low_cpu_mem_usage=True, switched it toeval()/torch.inference_mode(), and explicitly released per-page tensors/images to reduce inference-time memory spikes. - Changed ModelCard generation to instantiate
ModelCardGeneratoronly after PDF/XML/OCR artifacts have been extracted, then release it after the ModelCard is produced. - Stopped active initialization of unused ModelCard extractors while leaving their imports and constructor lines commented for future reactivation
- Deferred the
transformersimport used byQwenExtractorso importing the shared LLM extractor module does not load Transformers unless that extractor is instantiated