Instructions to use ctheodoris/Geneformer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ctheodoris/Geneformer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ctheodoris/Geneformer")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("ctheodoris/Geneformer") model = AutoModelForMaskedLM.from_pretrained("ctheodoris/Geneformer") - Inference
- Notebooks
- Google Colab
- Kaggle
Fix how mappings and train and val data are returned
#473
by hchen725 - opened
- geneformer/mtl/data.py +1 -1
geneformer/mtl/data.py
CHANGED
|
@@ -112,7 +112,7 @@ def preload_and_process_data(config):
|
|
| 112 |
# Validate that the mappings match
|
| 113 |
validate_label_mappings(config)
|
| 114 |
|
| 115 |
-
return (*train_data
|
| 116 |
|
| 117 |
|
| 118 |
def validate_label_mappings(config):
|
|
|
|
| 112 |
# Validate that the mappings match
|
| 113 |
validate_label_mappings(config)
|
| 114 |
|
| 115 |
+
return (*train_data[:2], *val_data) # Return train and val data along with mappings
|
| 116 |
|
| 117 |
|
| 118 |
def validate_label_mappings(config):
|