-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added atac_layer argument to train_model tasks and made tests for it
- Loading branch information
1 parent
4429882
commit f34196b
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Unit test package for pyrovelocity.""" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
"""Tests for `pyrovelocity._train_model` task.""" | ||
|
||
from pyrovelocity.tasks.train import train_model | ||
from pyrovelocity.utils import generate_sample_data | ||
from pyrovelocity.tasks.preprocess import copy_raw_counts | ||
def test_train_model(tmp_path): | ||
loss_plot_path = str(tmp_path) + "/loss_plot_docs.png" | ||
print(loss_plot_path) | ||
adata = generate_sample_data(random_seed=99) | ||
copy_raw_counts(adata) | ||
_, model, posterior_samples = train_model(adata, atac_layer = 'atac', | ||
use_gpu="auto", seed=99, max_epochs=200, loss_plot_path=loss_plot_path) |