Skip to content

Release 4.0#104

Merged
RalfG merged 106 commits into
masterfrom
release/4.0
Jul 10, 2026
Merged

Release 4.0#104
RalfG merged 106 commits into
masterfrom
release/4.0

Conversation

@RalfG

@RalfG RalfG commented Jul 10, 2026

Copy link
Copy Markdown
Member

Added

  • Multitask pretrained model as the new default, trained across multiple LC setups; automatic head selection in calibrate() based on Pearson correlation
  • predict_and_calibrate(), finetune_and_predict() core functions
  • Automatic calibration reference selection from input PSMs using q-value filtering or top-scoring fraction
  • Calibration.selected_model_head field
  • Built-in transfer learning via adapter-based fine-tuning (replaces deeplcretrainer)
  • NiceGUI web interface (deeplc gui / deeplc gui --native)
  • [gui] and [web] optional dependency groups
  • Docker image for containerized web server deployment
  • Windows one-click installer (PyInstaller + Inno Setup)
  • Sphinx-based documentation on ReadTheDocs
  • CI publish workflow with Windows installer and Docker image builds

Changed

  • PyTorch replaces TensorFlow as the deep learning backend
  • Class-based DeepLC API replaced by standalone functions (predict, calibrate, finetune, train, save_model, etc.)
  • Calibration split into a dedicated reusable module with sklearn-like API
  • CLI restructured into predict and gui subcommands
  • Input format uses psm_utils — accepts Sage, MaxQuant, mzTab, and others; peptide sequences in ProForma 2.0 notation
  • Removed ensemble prediction (three kernel sizes averaged); single model used
  • Improved spline calibration efficiency and default parameters
  • Modernized CI workflows to use uv

Removed

  • Library feature for storing past predictions
  • Legacy CALLC functionality

Alirezak2n and others added 30 commits March 14, 2025 15:23
I fix bugs and now it works perfectly
Add fine tuning class, dataset class, and make changes to doc string.
Remove TensorFlow and add PyTorch.
Remove redundancy.
PyTorch version of DeepLC
Cleanup and preliminary refactoring of feature extractor
- Remove ensemble-model mode (different kernel sizes).
- Split of model loading to separate function.
- Make dataset take peptidoforms instead of PSMs.
- Get unique peptidoforms before predicting and keep inverse index for mapping back predictions to input PSM list.
RalfG and others added 22 commits July 2, 2026 13:20
…in artefact. Also fix setup-uv action version for windows-installer job
feat: Add GUI, Windows installer, and Docker web server deployment
…d add annotations

- Move MultitaskAdapter from multitask.py into _architecture.py alongside
  BatchedHeads and MultitaskDeepLCModel; delete multitask.py
- Fix MultitaskAdapter.forward: unsqueeze(-1) -> unsqueeze(0); the guard branch
  produces shape [n_heads, 1] which is incompatible with nn.Linear(n_heads, ...);
  unsqueeze(0) gives the correct [1, n_heads]. Branch is dead code in normal
  inference since BatchedHeads always returns [batch, n_heads] (ndim=2).
- Add type annotations to MultitaskAdapter.forward, freeze_backbone, unfreeze_backbone
_best_correlating_head() and _is_multitask_output() are pure numpy helpers
specific to multitask calibration; they do not belong in core.py. Move them
to a dedicated _multitask_utils.py and import from there.
…test

- core.py: predict_and_calibrate used psm_list_reference (original param, may be
  None for auto-calibration) instead of parsed_psm_list_ref; fix both occurrences
- core.py: multitask_model.pt is always the default and is always packaged; remove
  DEFAULT_MODEL_FALLBACK, DEFAULT_MODEL_NAME, DEFAULT_MULTITASK_MODEL_WORKSPACE and
  the three-way conditional — set DEFAULT_MODEL = DEFAULT_MULTITASK_MODEL_PACKAGED
- test_model_ops.py: skip multitask model load test when model file is not bundled
predict() now returns [n, n_heads] with the multitask default model.
Select first head before comparing raw vs calibrated predictions.
Replace MultitaskDeepLCModel + MultitaskAdapter with a single DeepLCModel
that holds an optional fine-tuning MLP (attached via add_adapter()). All
models now return [batch, n_heads]; core.predict() normalises to 1D at the
public boundary. Checkpoints are plain state dicts loaded with weights_only=True,
removing the class-path dependency on the legacy pickle format. Migrate
bundled multitask_model.pt in-place to the new format.

Co-authored-by: Copilot <copilot@github.com>
Adds a typed `selected_model_head: int | None` field to the `Calibration`
base class to record which model head the calibration was fitted to. This
replaces the ad-hoc `getattr`-based monkey-patch previously used in core.py
to communicate head selection between `calibrate()` and `predict_and_calibrate()`.

`predict_and_calibrate()` now raises a clear `ValueError` when a pre-fitted
calibration is passed without `selected_model_head` set, instead of silently
re-deriving it via an extra predict call on the reference data.

Also adds missing docstrings and Pylance type narrowing fixes to calibration.py.

And update ruff settings.

Co-authored-by: Copilot <copilot@github.com>
Add multi-task learning functionality
- Add usage, migration guide, and prediction models pages
- Remove FAQ; consolidate modification content into usage
- Restructure index toctrees (Getting started, Python API, CLI, About)
- Rewrite README for v4 multitask model
- Fix psm-utils package name hyphenation in pyproject.toml
docs: overhaul documentation for v4
@RalfG RalfG added this to the 4.0.0 milestone Jul 10, 2026
@RalfG RalfG added enhancement New feature or request packaging Everything related to packaging and publishing GUI Issues and PRs around GUI dependencies Pull requests that update a dependency file v4 labels Jul 10, 2026
@RalfG RalfG merged commit 15bc3c4 into master Jul 10, 2026
5 checks passed
@RalfG RalfG deleted the release/4.0 branch July 10, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request GUI Issues and PRs around GUI packaging Everything related to packaging and publishing v4

Development

Successfully merging this pull request may close these issues.

4 participants