Skip to content

Fix bugs, preserve .var, bump deps, migrate to uv, add smoke tests#46

Merged
alitinet merged 5 commits into
mainfrom
codebase-update-uv-bugfixes
Jun 14, 2026
Merged

Fix bugs, preserve .var, bump deps, migrate to uv, add smoke tests#46
alitinet merged 5 commits into
mainfrom
codebase-update-uv-bugfixes

Conversation

@alitinet

Copy link
Copy Markdown
Collaborator

Fixes MultiVAE(losses=None) crash (bugs in both _multivae.py and _multivae_torch.py), load_query_data AttributeError on theta when integrate_on is set without nb/zinb loss, and silent zero-batch training in StratifiedSampler on small datasets.

Preserves .var metadata across modalities in organize_multimodal_anndatas, suffixing overlapping column names with modality index (issue #4). Adds defensive cont_covs.get() guard (issue #45).

Bumps to scvi-tools>=1.4.3 (Python >=3.12), removes numpy<2 and jax<0.6 caps, migrates from hatch to uv with PEP 735 dependency-groups, rewrites CI and RTD configs accordingly.

Adds minimal smoke test suite (4 tests, all passing), updates CHANGELOG, api.md, contributing.md, .gitignore, and re-executes both tutorial notebooks.

Fixes MultiVAE(losses=None) crash (bugs in both _multivae.py and
_multivae_torch.py), load_query_data AttributeError on theta when
integrate_on is set without nb/zinb loss, and silent zero-batch
training in StratifiedSampler on small datasets.

Preserves .var metadata across modalities in organize_multimodal_anndatas,
suffixing overlapping column names with modality index (issue #4).
Adds defensive cont_covs.get() guard (issue #45).

Bumps to scvi-tools>=1.4.3 (Python >=3.12), removes numpy<2 and jax<0.6
caps, migrates from hatch to uv with PEP 735 dependency-groups,
rewrites CI and RTD configs accordingly.

Adds minimal smoke test suite (4 tests, all passing), updates CHANGELOG,
api.md, contributing.md, .gitignore, and re-executes both tutorial notebooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

alitinet added 4 commits June 14, 2026 12:11
…main

- pyproject.toml: Merged dependency updates with optional-dependencies and dependency-groups
- _preprocessing.py: Integrated .var preservation (issue #4) with improved validation checks
- _multivae.py: Fixed condition formatting for losses check
- _multivae_torch.py: Kept ParameterList approach for supporting multiple NB/ZINB losses
- test_basic.py: Kept comprehensive test suite from HEAD
- CHANGELOG.md: Already properly resolved with all fixes documented
Fixed Issues:
1. test_warns_and_makes_unique_if_var_names_duplicate_across_modalities: Updated warning regex to match both old and new AnnData warning messages

2. test_end_to_end_default_losses: Fixed theta parameter handling by:
   - Changed test assertion to check for empty ParameterList instead of None
   - Updated _multivae.py to check if theta params have numel() > 0 instead of None
   - Added defensive .get() for continuous covariate registry (fixes issue #45)
   - Updated load_query_data freeze logic to handle ParameterList with empty params

Architecture Decision:
- Keep ParameterList approach over theta=None for better structural consistency
- Each modality has a theta parameter, either with NB/ZINB weights or empty (non-trainable)
- This ensures consistent indexing and handling across all model configurations

Version Update:
- Bumped version from 0.1.0 to 1.0.0 (aligns with CHANGELOG release)

Test Results: All 123 tests passing ✅
@alitinet alitinet merged commit 2fd3a9c into main Jun 14, 2026
6 checks passed
@alitinet alitinet deleted the codebase-update-uv-bugfixes branch June 14, 2026 10:51
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