Skip to content

Commit

Permalink
solving some reprod issues, some wip,
Browse files Browse the repository at this point in the history
  • Loading branch information
jkobject committed Nov 27, 2024
1 parent 3aadbbe commit 53e09ea
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 1,218 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,5 @@ file.txt
tests/data/step_0__predict_part_0_0.h5ad
data/human_dcm_hcm_nf/
data/geneformertest.csv
clf_omni.pkl
metrics__step0.json
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ release: ## Create a new tag for release.
@read -p "Version? (provide the next x.y.z semver) : " TAG
@echo "$${TAG}" > scprint/VERSION
@sed -i 's/^version = .*/version = "'$${TAG}'"/' pyproject.toml
@sed -i 's/__version__ = .*/__version__ = "'$${TAG}'"/' scprint/__init__.py
@$(ENV_PREFIX)gitchangelog > HISTORY.md
@git add scprint/VERSION HISTORY.md pyproject.toml
@git commit -m "release: version $${TAG} 🚀"
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ To use scPRINT, you will need to use [lamin.ai](https://lamin.ai/). This is need
To start you will need to do:

```bash
conda create -n <env-name> python==3.10 #scprint might work with python >3.10, but it is not tested
uv venv -n <env-name> python==3.10 #scprint might work with python >3.10, but it is not tested
#one of
pip install scprint # OR
pip install scprint[dev] # for the dev dependencies (building etc..) OR
pip install scprint[flash] # to use flashattention2 with triton: only if you have a compatible gpu (e.g. not available for apple GPUs for now, see https://github.com/triton-lang/triton?tab=readme-ov-file#compatibility)
uv pip install scprint # OR
uv pip install scprint[dev] # for the dev dependencies (building etc..) OR
uv pip install scprint[flash] # to use flashattention2 with triton: only if you have a compatible gpu (e.g. not available for apple GPUs for now, see https://github.com/triton-lang/triton?tab=readme-ov-file#compatibility)
#OR pip install scPRINT[dev,flash]

lamin init --storage ./testdb --name test --schema bionty
Expand Down
186 changes: 93 additions & 93 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,70 @@ trainer:
precision: 16
logger: false
callbacks:
- class_path: scprint.trainer.TrainingMode
init_args:
do_denoise: true
noise:
- 0.3
do_cce: true
cce_sim: 0.5
do_ecs: true
ecs_threshold: 0.3
ecs_scale: 1.0
do_mvc: false
do_adv_cls: false
do_next_tp: false
class_scale: 1.0
mask_ratio:
- 0.15
- 0.3
log_grad: false
- class_path: lightning.pytorch.callbacks.StochasticWeightAveraging
init_args:
swa_lrs: 0.01
swa_epoch_start: 0.8
annealing_epochs: 10
annealing_strategy: cos
avg_fn: null
device: cpu
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
dirpath: null
filename: null
monitor: val_loss
verbose: false
save_last: null
save_top_k: -1
save_weights_only: false
mode: min
auto_insert_metric_name: true
every_n_train_steps: null
train_time_interval: null
every_n_epochs: null
save_on_train_epoch_end: null
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
monitor: val_loss
min_delta: 0.0
patience: 10
verbose: false
mode: min
strict: true
check_finite: true
stopping_threshold: null
divergence_threshold: null
check_on_train_epoch_end: null
log_rank_zero_only: false
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: step
log_momentum: false
- class_path: scprint.trainer.TrainingMode
init_args:
do_denoise: true
noise:
- 0.3
do_cce: true
cce_sim: 0.5
do_ecs: true
ecs_threshold: 0.3
ecs_scale: 1.0
do_mvc: false
do_adv_cls: false
do_next_tp: false
class_scale: 1.0
mask_ratio:
- 0.15
- 0.3
log_grad: false
- class_path: lightning.pytorch.callbacks.StochasticWeightAveraging
init_args:
swa_lrs: 0.01
swa_epoch_start: 0.8
annealing_epochs: 10
annealing_strategy: cos
avg_fn: null
device: cpu
- class_path: lightning.pytorch.callbacks.ModelCheckpoint
init_args:
dirpath: null
filename: null
monitor: val_loss
verbose: false
save_last: null
save_top_k: -1
save_weights_only: false
mode: min
auto_insert_metric_name: true
every_n_train_steps: null
train_time_interval: null
every_n_epochs: null
save_on_train_epoch_end: null
- class_path: lightning.pytorch.callbacks.EarlyStopping
init_args:
monitor: val_loss
min_delta: 0.0
patience: 10
verbose: false
mode: min
strict: true
check_finite: true
stopping_threshold: null
divergence_threshold: null
check_on_train_epoch_end: null
log_rank_zero_only: false
- class_path: lightning.pytorch.callbacks.LearningRateMonitor
init_args:
logging_interval: step
log_momentum: false
fast_dev_run: false
max_epochs: null
min_epochs: null
max_steps: -1
min_steps: null
max_time: '{''hours'': 12}'
max_time: "{'hours': 12}"
limit_train_batches: null
limit_val_batches: null
limit_test_batches: null
Expand Down Expand Up @@ -112,10 +112,10 @@ model:
n_input_bins: 0
mvc_decoder: inner product
pred_embedding:
- cell_type_ontology_term_id
- disease_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- cell_type_ontology_term_id
- disease_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
cell_emb_style: cls
lr: 0.001
residual_in_fp32: true
Expand All @@ -128,47 +128,47 @@ model:
fused_mlp: false
fused_bias_fc: false
sequence_parallel: false
drop_path_rate: 0.02
weight_init: ''
drop_path_rate: 0
weight_init: ""
data:
mdataset: null
collection_name: preprocessed dataset
organisms:
- NCBITaxon:9606
- NCBITaxon:9606
weight_scaler: 30
label_to_weight:
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- organism_ontology_term_id
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- organism_ontology_term_id
label_to_pred:
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- organism_ontology_term_id
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- organism_ontology_term_id
validation_split: 0.2
test_split: 0.0
use_default_col: true
all_clss:
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- organism_ontology_term_id
- heat_diff
- total_counts
- nnz
- dpt_group
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- sex_ontology_term_id
- organism_ontology_term_id
- heat_diff
- total_counts
- nnz
- dpt_group
hierarchical_labels:
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
- cell_type_ontology_term_id
- disease_ontology_term_id
- assay_ontology_term_id
- self_reported_ethnicity_ontology_term_id
how: most expr
organism_name: organism_ontology_term_id
max_len: 1000
Expand All @@ -188,7 +188,7 @@ data:
generator: null
prefetch_factor: null
persistent_workers: false
pin_memory_device: ''
pin_memory_device: ""
set_float32_matmul_precision: true
project: scprint_test
ckpt_path: null
Loading

0 comments on commit 53e09ea

Please sign in to comment.