Skip to content

Compound Label#47

Merged
Gautam8387 merged 3 commits into
masterfrom
compound-label
Jul 16, 2026
Merged

Compound Label#47
Gautam8387 merged 3 commits into
masterfrom
compound-label

Conversation

@Gautam8387

@Gautam8387 Gautam8387 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

Compound label support for CyteOnto: LLM decomposition, Hungarian compound scoring, result/schema updates, Modal hardening, docs, and dependency/metadata cleanup.

Resolves #46, #22 and dependencies

Changes

  • Add LLM-based compound label decomposition (LabelDecomposition, decompose_label / decompose_labels) with per-run_id JSON cache under user_files/decompositions/
  • Score compound author/algorithm pairs with Hungarian max-weight matching and cytescore_compound instead of treating mixture labels as a single string
  • Apply coverage penalty min(m,n) / max(m,n) when author and algorithm part counts differ
  • Add author_ontology_name and algorithm_ontology_name to compare results (CSV primary label with OWL fallback)
  • Emit matched assignment ontology ids/names only for compound pairs (semicolon-separated when k > 1)
  • Fix pair_index corruption caused by inner loop variable shadowing in the compound scoring path
  • Preserve similarity_method=empty behavior for blank labels while keeping ontology fields on the non-empty side
  • Cache decompositions per label string so reruns with the same run_id skip LLM calls for labels already on disk
  • Fix Pydantic AI deprecation by using result.usage instead of result.usage() in describe and decompose runners
  • Harden Modal job startup with volume reload retries, atomic status.json writes, and worker-side initial status validation
  • Add scripts/test_modal_simple_labels.sh and scripts/test_modal_compound_labels.sh for hosted API smoke tests
  • Add tests/test_modal_status.py for Modal status read/write and worker reload behavior
  • Expand unit tests for decomposition, Hungarian scoring, compound compare integration, and pair_index correctness
  • Update notebooks/quick_tutorial.ipynb with synthetic Hungarian demos and live compound comparison scenarios
  • Update root README, cyteonto/README.md, docs/WORKFLOW.md, docs/FILE_MANAGEMENT.md, and modal_app/README.md for the new pipeline and result columns
  • Bump aiohttp to >=3.14.0 and pydantic-ai to >=1.102.0,<2.0.0, refreshing uv.lock for tested transitive upgrades
  • Add production pyproject.toml metadata (description, license, authors, keywords, URLs) and hatchling build config with dynamic version from cyteonto/__init__.py
  • Extend .gitignore for build artifacts and local result outputs

…ring; add ontology name columns and fix pair_index shadowing in compound pairs; update docs, notebook, and Modal worker/status handling; add Modal smoke scripts and tests; bump dependencies and production pyproject metadata
@Gautam8387
Gautam8387 merged commit 3ef59de into master Jul 16, 2026
1 check passed
@Gautam8387
Gautam8387 deleted the compound-label branch July 16, 2026 13:11
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.

Compound Labels

1 participant