You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* For a **supervised** model, like [esm](esm/), it calls `load_model` and `predict_model` in order:
31
-
*`load_model` uses `manifest` as input, and returns a model object as output.
32
-
*`predict_model` uses `dataset`, `manifest` and the model object as input, and returns the inferred predictions in a data frame as output.
30
+
* For a **supervised** model, like [esm](esm/), it calls `load` and `infer` in order:
31
+
*`load` uses `manifest` as input, and returns a model object as output.
32
+
*`infer` uses `dataset`, `manifest` and the model object as input, and returns the inferred predictions in a data frame as output.
33
33
34
-
* For a **zero-shot** model, like [pls](pls/), it calls `train_model` and `predict_model` in order:
35
-
*`train_model` uses `dataset` and `manifest` as input, and returns a model object as output.
36
-
*`predict_model` uses `dataset`, `manifest` and the model object as input, and returns the inferred predictions in a data frame as output.
34
+
* For a **zero-shot** model, like [pls](pls/), it calls `train` and `infer` in order:
35
+
*`train` uses `dataset` and `manifest` as input, and returns a model object as output.
36
+
*`infer` uses `dataset`, `manifest` and the model object as input, and returns the inferred predictions in a data frame as output.
37
37
38
38
The result data frame is saved on the disk in the local environment and stored in AWS S3 in the cloud environment. After the container is destroyed, the result data frame is persisted for the later metric calculation.
39
39
@@ -73,12 +73,12 @@ def train(
73
73
74
74
# For a supervised model
75
75
model = load(manifest)
76
-
df =predict(dataset, manifest, model)
76
+
df =infer(dataset, manifest, model)
77
77
df.to_csv(...)
78
78
79
79
# For a zero-shot model
80
80
model = train(dataset, manifest)
81
-
df =predict(dataset, manifest, model)
81
+
df =infer(dataset, manifest, model)
82
82
df.to_csv(...)
83
83
84
84
@@ -105,8 +105,8 @@ following code structure:
105
105
### `__main__.py`
106
106
107
107
The `__main__.py` contains the `train` entrypoint as shown above.
108
-
The code loads the dataset and model (card) before passing it to the `load_model`, `train_model`
109
-
or `predict_model` methods.
108
+
The code loads the dataset and model (card) before passing it to the `load`, `train`
0 commit comments