Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fc update multivi #291

Merged
merged 7 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/integration01-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,17 @@ jobs:
activate-environment: pipeline_env
environment-file: pipeline_env.yaml
# important: this patch is only to test if multivi integration works
# issues are not related to panpipes https://discourse.scverse.org/t/error-when-training-model-on-m3-max-mps/1896/2
# pip install -e . #'.[multivipatch]'
# issues are not related to panpipes
# https://discourse.scverse.org/t/error-when-training-model-on-m3-max-mps/1896/2
# https://discourse.scverse.org/t/macbook-m1-m2-mps-acceleration-with-scvi/2075/4

# now disabling adversarial training for temp fix to ensure running latest multivi
# https://github.com/scverse/scvi-tools/issues/2581
- name: Install Panpipes
shell: bash -el {0}
run: |
pip install '.[multivipatch]'
pip install -e .
conda list

- name: Conda info
Expand Down Expand Up @@ -98,3 +103,7 @@ jobs:
- name: File tree
if: env.debug == 'true'
run: tree teaseq

- name: check logs
if: always()
run: cat teaseq/integration/logs/4_multimodal_multivi.log
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

- fixed calls to new imports matplotlib
- fixed scanpy/muon latest
- changed default adversarial_training = False to ensure multivi runs with scvi-tools 1.1.3 https://github.com/scverse/scvi-tools/issues/2581
- updated integration01 action to use updated scvi-tools version

### dependencies

Expand Down
2 changes: 2 additions & 0 deletions docs/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

- fixed calls to new imports matplotlib
- fixed scanpy/muon latest
- changed default adversarial_training = False to ensure multivi runs with scvi-tools 1.1.3 https://github.com/scverse/scvi-tools/issues/2581
- updated integration01 action to use updated scvi-tools version

### dependencies

Expand Down
2 changes: 1 addition & 1 deletion docs/yaml_docs/pipeline_integration_yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ For more information on `bbknn` check the [bbknn documentation](https://bbknn.re
- <span class="parameter">n_steps_kl_warmup</span> `String`, Default: None<br>
Leave blank for the default integer
- <span class="parameter">n_epochs_kl_warmup</span> `Integer`, Default: 50<br>
- <span class="parameter">adversarial_mixing</span> `Boolean`, Default: True<br>
- <span class="parameter">adversarial_mixing</span> `Boolean`, Default: False<br>
- <span class="parameter">training_plan</span> `String`, Default: None<br>


Expand Down
2 changes: 1 addition & 1 deletion panpipes/panpipes/pipeline_integration/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ multimodal:
check_val_every_n_epoch :
n_steps_kl_warmup :
n_epochs_kl_warmup : 50
adversarial_mixing : True
adversarial_mixing : False
training_plan :

# Mofa arguments
Expand Down
8 changes: 8 additions & 0 deletions panpipes/python_scripts/batch_correct_multivi.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,14 @@

mvi.view_anndata_setup()

L.info("training args")
print(multivi_training_args)


L.info("training plan")
print(multivi_training_plan)


L.info("Running multiVI")
mvi.train( **multivi_training_args, **multivi_training_plan)

Expand Down
5 changes: 0 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ spatial = [
"tangram-sc"
]

multivipatch = [
"scvi-tools<=0.20.3",
"requests"
]

refmap_old = [
"scvi-tools",
"pandas<2.0.0",
Expand Down
13 changes: 6 additions & 7 deletions tests/integration_1/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ multimodal:
# you can add any other param from the tutorials and they will
# be parsed alongside the others
# leave arguments blank for default
seed: 1492
lowmem: True
# Set lowmem to True will subset the atac to the top 25k HVF.
# This is to deal with concatenation of atac,rna on large datasets which at the moment is suboptimally required by scvitools.
Expand All @@ -260,14 +259,14 @@ multimodal:
fully_paired : False
training_args:
#(default: 500)
max_epochs : 500
max_epochs : 20
#float (default: 0.0001)
lr : 1.0e-05
#leave blanck for default str | int | bool | None (default: None)
#leave blank for default str | int | bool | None (default: None)
use_gpu :
# float (default: 0.9)
train_size : 0.9
# leave blanck for default, float | None (default: None)
# leave blank for default, float | None (default: None)
validation_size :
# int (default: 128)
batch_size : 128
Expand All @@ -279,15 +278,15 @@ multimodal:
early_stopping : True
#bool (default: True)
save_best : True
#leave blanck for default int | None (default: None)
#leave blank for default int | None (default: None)
check_val_every_n_epoch :
#leave blanck for default int | None (default: None)
#leave blank for default int | None (default: None)
n_steps_kl_warmup :
# int | None (default: 50)
n_epochs_kl_warmup : 50
#bool (default: True)
adversarial_mixing : False
#leave blanck for default dict | None (default: None)
#leave blank for default dict | None (default: None)
training_plan :
mofa:
# this is a minimal set of parameters that will be expected
Expand Down