Skip to content

Conversation

@Sprengmeister-dev
Copy link

Summary

This PR introduces explicit training configuration objects for scvi-tools, reducing reliance on loose kwargs and improving clarity across training APIs.

Changes

  • Added TrainingPlanConfig, TrainerConfig, and related config dataclasses with a shared merge helper.
  • Wired plan_config / trainer_config through training mixins, TrainRunner, and model training wrappers.
  • Updated docs to document the new configuration pattern and added a user guide page.
  • Added unit tests for config merging behavior.

Testing

  • python -m pytest tests/train/test_trainingplans.py
  • python -m pytest tests/train/test_config.py

Notes

  • plan_kwargs and **trainer_kwargs remain supported; explicit configs are additive.

@Sprengmeister-dev Sprengmeister-dev force-pushed the 2904-explicit-configs branch 6 times, most recently from 31ef322 to 432efa3 Compare January 2, 2026 12:50
@codecov
Copy link

codecov bot commented Jan 4, 2026

Codecov Report

❌ Patch coverage is 91.51943% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.22%. Comparing base (7ce63e0) to head (7f2cf5d).

Files with missing lines Patch % Lines
src/scvi/train/_config.py 91.91% 16 Missing ⚠️
src/scvi/autotune/__init__.py 55.55% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3666      +/-   ##
==========================================
+ Coverage   84.70%   86.22%   +1.51%     
==========================================
  Files         225      226       +1     
  Lines       21637    21859     +222     
==========================================
+ Hits        18327    18847     +520     
+ Misses       3310     3012     -298     
Files with missing lines Coverage Δ
src/scvi/external/cellassign/_model.py 94.31% <100.00%> (+1.05%) ⬆️
src/scvi/external/contrastivevi/_model.py 80.30% <100.00%> (+0.09%) ⬆️
src/scvi/external/cytovi/_model.py 81.36% <100.00%> (+0.24%) ⬆️
src/scvi/external/gimvi/_model.py 92.51% <100.00%> (+0.03%) ⬆️
src/scvi/external/mrvi_jax/_model.py 89.96% <100.00%> (+0.01%) ⬆️
src/scvi/external/mrvi_torch/_model.py 88.30% <100.00%> (+0.01%) ⬆️
src/scvi/external/resolvi/_model.py 93.29% <100.00%> (ø)
src/scvi/external/scbasset/_model.py 50.00% <100.00%> (+1.20%) ⬆️
src/scvi/external/solo/_model.py 96.66% <100.00%> (+0.64%) ⬆️
src/scvi/external/stereoscope/_model.py 97.33% <100.00%> (+2.59%) ⬆️
... and 15 more

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ori-kron-wis
Copy link
Collaborator

ori-kron-wis commented Jan 5, 2026

close #2904

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autotune custom_dataloader PR 2932 hub internet tests Run internet tests mlflow nonJAX on-merge: backport to 1.4.x on-merge: backport to 1.4.x optional tests Run optional tests private tests Run private tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants