Skip to content

Commit e0e3c90

Browse files
authored
stop copying train_mod2 into novel's model artifact (#47)
novel_predict only reads uns from that file -- modality, model_dim and removed_vars -- so there's no reason to carry the expression matrix, obs and var along with it.
1 parent 7e413b1 commit e0e3c90

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
* `lm`: Drop the unused `n_cores` and ask for `lowcpu` rather than `highcpu`. The per-gene loop is `pbapply::pblapply()` without a cluster, so it has always run on one core (PR #42).
3232

33+
* `novel_train`: Store only the metadata `novel_predict` needs in the model artifact, instead of a full copy of `train_mod2` (PR #47).
34+
3335
## BUG FIXES
3436

3537
* `process_dataset`: Fall back to holding out a quarter of the batches when the dataset has no `obs["is_train"]`, rather than silently producing four empty h5ads. `obs["is_train"]` carries the NeurIPS 2021 competition split and stays optional; `obs["cell_type"]` is now declared and required (PR #28).

src/methods/novel/novel_train/script.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
input_train_mod1 = ad.read_h5ad(par['input_train_mod1'])
4040
input_train_mod2 = ad.read_h5ad(par['input_train_mod2'])
4141

42-
adata = input_train_mod2.copy()
42+
# carries the metadata novel_predict needs; the matrix itself is not used there
43+
adata = ad.AnnData(uns=dict(input_train_mod2.uns))
4344

4445
mod1 = input_train_mod1.uns['modality']
4546
mod2 = input_train_mod2.uns['modality']

0 commit comments

Comments
 (0)