Skip to content
Open
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@

## Minor changes

* Expose `methods/scgpt_finetuned`'s epochs and batch size as arguments, preserving defaults of 15 and 64.
Batch size also applies to validation and embedding (issue #111).
* Un-pin the scPRINT version and update parameters (PR #51)
* Update scPRINT to better handle large datasets, including a new default model (PR #54)
* Credit contributors missing from the authors list, and fix Martin Kim's orcid (PR #100).
Expand Down
4 changes: 4 additions & 0 deletions _viash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ authors:
info:
github: cmclean
orcid: 0000-0001-9928-8216
- name: Daesun Ryu
roles: [contributor]
info:
github: Daesun-Ryu
config_mods: |
.runners[.type == "nextflow"].config.labels := { lowmem : "memory = 20.Gb", midmem : "memory = 50.Gb", highmem : "memory = 100.Gb", lowcpu : "cpus = 5", midcpu : "cpus = 15", highcpu : "cpus = 30", lowtime : "time = 1.h", midtime : "time = 4.h", hightime : "time = 8.h", veryhightime : "time = 24.h" }

Expand Down
14 changes: 14 additions & 0 deletions src/methods/scgpt_finetuned/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ arguments:
type: integer
default: 3000
description: Number of highly variable genes to use.
- name: --epochs
type: integer
default: 15
min: 1
description: Number of fine-tuning epochs.
info:
test_default: 2
- name: --batch_size
type: integer
default: 64
min: 1
description: Batch size for fine-tuning, validation and embedding.
info:
test_default: 4

resources:
- type: python_script
Expand Down
8 changes: 5 additions & 3 deletions src/methods/scgpt_finetuned/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"model_name": "scGPT_human",
"model": "scGPT_human",
"n_hvg": 3000,
"epochs": 15,
"batch_size": 64,
}
meta = {"name": "scgpt"}
## VIASH END
Expand Down Expand Up @@ -221,9 +223,9 @@
"ecs_thres": 0.8, # Elastic cell similarity objective, 0.0 to 1.0, 0.0 to disable
"dab_weight": 1.0, # DAR objective weight for batch correction
"mask_ratio": 0.4,
"epochs": 15,
"epochs": par["epochs"],
"lr": 1e-4,
"batch_size": 64,
"batch_size": par["batch_size"],
"dropout": 0.2,
"schedule_ratio": 0.9, # Learning rate decay
"log_interval": 100,
Expand Down Expand Up @@ -364,7 +366,7 @@
adata,
best_model_dir.name,
gene_col="feature_name",
batch_size=64,
batch_size=par["batch_size"],
use_fast_transformer=False, # Disable fast-attn as not installed
device=device,
return_new_adata=True,
Expand Down