Skip to content

Commit

Permalink
make quickstart batchable
Browse files Browse the repository at this point in the history
  • Loading branch information
sauyon committed Nov 1, 2022
1 parent 3193102 commit 99286e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/quickstart/service.py
Expand Up @@ -9,7 +9,7 @@


@svc.api(
input=NumpyNdarray.from_sample(np.array([[4.9, 3.0, 1.4, 0.2]], dtype=np.double)),
input=NumpyNdarray.from_sample(np.array([[4.9, 3.0, 1.4, 0.2]], dtype=np.double), enforce_shape=False),
output=NumpyNdarray(),
)
async def classify(input_series: np.ndarray) -> np.ndarray:
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/train.py
Expand Up @@ -18,5 +18,5 @@
clf.fit(X, y)

# Save model to BentoML local model store
saved_model = bentoml.sklearn.save_model("iris_clf", clf)
saved_model = bentoml.sklearn.save_model("iris_clf", clf, signatures={"predict": {"batchable": True, "batch_dim": 0}})
print(f"Model saved: {saved_model}")

0 comments on commit 99286e7

Please sign in to comment.