Skip to content

docs: audit comments/docs, fix stf-predict, relicense to Apache-2.0#14

Merged
BenjaminIsaac0111 merged 1 commit into
mainfrom
docs/audit-and-apache-license
Jun 29, 2026
Merged

docs: audit comments/docs, fix stf-predict, relicense to Apache-2.0#14
BenjaminIsaac0111 merged 1 commit into
mainfrom
docs/audit-and-apache-license

Conversation

@BenjaminIsaac0111

Copy link
Copy Markdown
Owner

Realign the documentation and in-code comments with the current pathway-exclusive architecture (after the bilinear-head change, #13), fix the broken stf-predict entry point, and relicense the project.

Docs & comments

  • Scoring head: docs/comments described cosine similarity + a learnable temperature; the model now uses softplus(scale * dot(patch, pathway) / sqrt(d) + bias). Updated MODELS.md (formula + diagram) and the interaction.py comments/docstrings.
  • Replaced stale "gene expression" framing with pathway-activity wording in init.py, predict.py, mil.py, engine.py and losses.py docstrings.
  • Corrected the dataset contract to the real 5-tuple (features, gene_counts, pathway_targets, rel_coords, mask) in data/base.py and DATALOADER.md.
  • Removed references to non-existent CLI flags (--log-transform, --mask-radius, --use-nystrom) and the wrong stf-compute-features name in TRAINING_GUIDE.md.
  • Rewrote docs/API.md to match the real public API (num_pathways, model.pathway_names, real Trainer/Predictor/loss/engine signatures, 5-tuple BYOD contract).
  • De-staled docs/SC_BEST_PRACTICES.md (pathway-primary reframing is now implemented; dropped removed flags and fixed status mismatches).

stf-predict

  • Added a working main() to predict.py; the pyproject entry point mapped to a function that no longer existed. It loads a run dir (results_summary.json + best_model_.pth), rebuilds the model via builder.setup_model, and renders the spatial prediction-vs-truth plot. Updated the documented usage in README and PATHWAY_MAPPING.

Licensing

  • Relicensed from the hand-rolled proprietary license to Apache-2.0 (LICENSE is the verbatim text). Added NOTICE with copyright + third-party attributions (HEST-1k, MSigDB, foundation-model backbones) and the SURVPATH "inspired by, not derived from" note. Updated README, CONTRIBUTING and pyproject; reframed docs/IP_STATEMENT.md as accurate provenance/attribution. Added CITATION.cff.

Realign the documentation and in-code comments with the current
pathway-exclusive architecture (after the bilinear-head change, #13),
fix the broken stf-predict entry point, and relicense the project.

Docs & comments
- Scoring head: docs/comments described cosine similarity + a learnable
  temperature; the model now uses softplus(scale * dot(patch, pathway)
  / sqrt(d) + bias). Updated MODELS.md (formula + diagram) and the
  interaction.py comments/docstrings.
- Replaced stale "gene expression" framing with pathway-activity wording
  in __init__.py, predict.py, mil.py, engine.py and losses.py docstrings.
- Corrected the dataset contract to the real 5-tuple
  (features, gene_counts, pathway_targets, rel_coords, mask) in
  data/base.py and DATALOADER.md.
- Removed references to non-existent CLI flags (--log-transform,
  --mask-radius, --use-nystrom) and the wrong stf-compute-features name
  in TRAINING_GUIDE.md.
- Rewrote docs/API.md to match the real public API (num_pathways,
  model.pathway_names, real Trainer/Predictor/loss/engine signatures,
  5-tuple BYOD contract).
- De-staled docs/SC_BEST_PRACTICES.md (pathway-primary reframing is now
  implemented; dropped removed flags and fixed status mismatches).

stf-predict
- Added a working main() to predict.py; the pyproject entry point mapped
  to a function that no longer existed. It loads a run dir
  (results_summary.json + best_model_<type>.pth), rebuilds the model via
  builder.setup_model, and renders the spatial prediction-vs-truth plot.
  Updated the documented usage in README and PATHWAY_MAPPING.

Licensing
- Relicensed from the hand-rolled proprietary license to Apache-2.0
  (LICENSE is the verbatim text). Added NOTICE with copyright +
  third-party attributions (HEST-1k, MSigDB, foundation-model backbones)
  and the SURVPATH "inspired by, not derived from" note. Updated README,
  CONTRIBUTING and pyproject; reframed docs/IP_STATEMENT.md as accurate
  provenance/attribution. Added CITATION.cff.
@BenjaminIsaac0111 BenjaminIsaac0111 merged commit 50015b7 into main Jun 29, 2026
2 checks passed
@BenjaminIsaac0111 BenjaminIsaac0111 deleted the docs/audit-and-apache-license branch June 29, 2026 18:28
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