moshe-raboh
commited on
Commit
•
4397b58
1
Parent(s):
603c70e
Update README.md
Browse files
README.md
CHANGED
@@ -41,7 +41,14 @@ pip install git+https://github.com/BiomedSciAI/biomed-multi-alignment.git
|
|
41 |
|
42 |
A simple example for a task already supported by `ibm/biomed.omics.bl.sm.ma-ted-400m`:
|
43 |
```python
|
|
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
# Load Model
|
47 |
model = Mammal.from_pretrained("ibm/biomed.omics.bl.sm.ma-ted-400m.dti_bindingdb_pkd")
|
@@ -68,8 +75,8 @@ batch_dict = nn_model.forward_encoder_only([sample_dict])
|
|
68 |
batch_dict = DtiBindingdbKdTask.process_model_output(
|
69 |
batch_dict,
|
70 |
scalars_preds_processed_key="model.out.dti_bindingdb_kd",
|
71 |
-
norm_y_mean=
|
72 |
-
norm_y_std=
|
73 |
)
|
74 |
ans = {
|
75 |
"model.out.dti_bindingdb_kd": float(batch_dict["model.out.dti_bindingdb_kd"][0])
|
|
|
41 |
|
42 |
A simple example for a task already supported by `ibm/biomed.omics.bl.sm.ma-ted-400m`:
|
43 |
```python
|
44 |
+
import os
|
45 |
|
46 |
+
from fuse.data.tokenizers.modular_tokenizer.op import ModularTokenizerOp
|
47 |
+
from fuse.data.utils.collates import CollateDefault
|
48 |
+
|
49 |
+
from mammal.examples.dti_bindingdb_kd.task import DtiBindingdbKdTask
|
50 |
+
from mammal.keys import CLS_PRED, SCORES
|
51 |
+
from mammal.model import Mammal
|
52 |
|
53 |
# Load Model
|
54 |
model = Mammal.from_pretrained("ibm/biomed.omics.bl.sm.ma-ted-400m.dti_bindingdb_pkd")
|
|
|
75 |
batch_dict = DtiBindingdbKdTask.process_model_output(
|
76 |
batch_dict,
|
77 |
scalars_preds_processed_key="model.out.dti_bindingdb_kd",
|
78 |
+
norm_y_mean=5.79384684128215,
|
79 |
+
norm_y_std=1.33808027428196,
|
80 |
)
|
81 |
ans = {
|
82 |
"model.out.dti_bindingdb_kd": float(batch_dict["model.out.dti_bindingdb_kd"][0])
|