Release 4.0#104
Merged
Merged
Conversation
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.
…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
Clean up repository
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added
calibrate()based on Pearson correlationpredict_and_calibrate(),finetune_and_predict()core functionsCalibration.selected_model_headfielddeeplcretrainer)deeplc gui/deeplc gui --native)[gui]and[web]optional dependency groupsChanged
DeepLCAPI replaced by standalone functions (predict,calibrate,finetune,train,save_model, etc.)predictandguisubcommandsuvRemoved