Caleb Ellington commited on
Commit
44dde53
1 Parent(s): 7d4c082

update with major refactor

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. config.yaml +8 -8
README.md CHANGED
@@ -19,11 +19,11 @@ snapshot_download(repo_id=model_name, local_dir=genbio_models_path)
19
  ```
20
  ### Load model for inference
21
  ```python
22
- from genbio_finetune.tasks import SequenceRegression
23
 
24
  ckpt_path = genbio_models_path.joinpath('fold0', 'model.ckpt')
25
  model = SequenceRegression.load_from_checkpoint(ckpt_path, strict_loading=False).eval()
26
 
27
- collated_batch = model.collate({"sequences": ["ACGT", "AGCT"]})
28
  logits = model(collated_batch)
29
  print(logits)
 
19
  ```
20
  ### Load model for inference
21
  ```python
22
+ from modelgenerator.tasks import SequenceRegression
23
 
24
  ckpt_path = genbio_models_path.joinpath('fold0', 'model.ckpt')
25
  model = SequenceRegression.load_from_checkpoint(ckpt_path, strict_loading=False).eval()
26
 
27
+ collated_batch = model.transform({"sequences": ["ACGT", "AGCT"]})
28
  logits = model(collated_batch)
29
  print(logits)
config.yaml CHANGED
@@ -37,7 +37,7 @@ trainer:
37
  class_path: lightning.pytorch.loggers.WandbLogger
38
  init_args:
39
  name: pa_hsapiens_rnafmـcds_1.6B_fold0
40
- save_dir: genbio_finetune/logs
41
  version: null
42
  offline: false
43
  dir: null
@@ -75,7 +75,7 @@ trainer:
75
  log_weight_decay: false
76
  - class_path: lightning.pytorch.callbacks.ModelCheckpoint
77
  init_args:
78
- dirpath: genbio_finetune/logs/rna_tasks/pa_hsapiens_rnafmـcds_1.6B_fold1
79
  filename: best_val:{epoch}-{val_pearson:.3f}
80
  monitor: val_pearson
81
  verbose: false
@@ -134,12 +134,12 @@ trainer:
134
  plugins: null
135
  sync_batchnorm: false
136
  reload_dataloaders_every_n_epochs: 0
137
- default_root_dir: genbio_finetune/logs
138
  model:
139
- class_path: genbio_finetune.tasks.SequenceRegression
140
  init_args:
141
  backbone:
142
- class_path: genbio_finetune.models.rnafm_cds
143
  init_args:
144
  from_scratch: false
145
  max_length: 1024
@@ -156,7 +156,7 @@ model:
156
  attention_probs_dropout_prob: 0.1
157
  model_init_args: null
158
  adapter:
159
- class_path: genbio_finetune.models.MLPPoolAdapter
160
  init_args:
161
  pooling: mean_pooling
162
  hidden_sizes:
@@ -181,7 +181,7 @@ model:
181
  differentiable: false
182
  fused: null
183
  lr_scheduler:
184
- class_path: genbio_finetune.lr_schedulers.CosineWithWarmup
185
  init_args:
186
  warmup_ratio: 0.01
187
  num_warmup_steps: null
@@ -191,7 +191,7 @@ model:
191
  strict_loading: true
192
  reset_optimizer_states: false
193
  data:
194
- class_path: genbio_finetune.data.ProteinAbundance
195
  init_args:
196
  path: genbio-ai/rna-downstream-tasks
197
  config_name: protein_abundance_hsapiens
 
37
  class_path: lightning.pytorch.loggers.WandbLogger
38
  init_args:
39
  name: pa_hsapiens_rnafmـcds_1.6B_fold0
40
+ save_dir: modelgenerator/logs
41
  version: null
42
  offline: false
43
  dir: null
 
75
  log_weight_decay: false
76
  - class_path: lightning.pytorch.callbacks.ModelCheckpoint
77
  init_args:
78
+ dirpath: modelgenerator/logs/rna_tasks/pa_hsapiens_rnafmـcds_1.6B_fold1
79
  filename: best_val:{epoch}-{val_pearson:.3f}
80
  monitor: val_pearson
81
  verbose: false
 
134
  plugins: null
135
  sync_batchnorm: false
136
  reload_dataloaders_every_n_epochs: 0
137
+ default_root_dir: modelgenerator/logs
138
  model:
139
+ class_path: modelgenerator.tasks.SequenceRegression
140
  init_args:
141
  backbone:
142
+ class_path: modelgenerator.backbones.rnafm_cds
143
  init_args:
144
  from_scratch: false
145
  max_length: 1024
 
156
  attention_probs_dropout_prob: 0.1
157
  model_init_args: null
158
  adapter:
159
+ class_path: modelgenerator.adapters.MLPPoolAdapter
160
  init_args:
161
  pooling: mean_pooling
162
  hidden_sizes:
 
181
  differentiable: false
182
  fused: null
183
  lr_scheduler:
184
+ class_path: modelgenerator.lr_schedulers.CosineWithWarmup
185
  init_args:
186
  warmup_ratio: 0.01
187
  num_warmup_steps: null
 
191
  strict_loading: true
192
  reset_optimizer_states: false
193
  data:
194
+ class_path: modelgenerator.data.ProteinAbundance
195
  init_args:
196
  path: genbio-ai/rna-downstream-tasks
197
  config_name: protein_abundance_hsapiens