Unanswered
Hi All
No problem, I tried with this code :
from sklearn.linear_model import LogisticRegression
from sklearn.datasets import make_blobs
from joblib import dump
from clearml import Task, OutputModel
task = Task.init(project_name="serving examples", task_name="train sklearn model", output_uri=True)
# generate 2d classification dataset
X, y = make_blobs(n_samples=100, centers=2, n_features=2, random_state=1)
# fit final model
model = LogisticRegression()
model.fit(X, y)
#dump(model, filename="sklearn-model.pkl", compress=9)
output_model = OutputModel(task=task, framework="ScikitLearn")
output_model.update_weights(weights_filename='sklearn-model.pkl')
And sadly I got the same error 😞 : $ curl -X POST "***/serve/sklearn_slack" -H "accept: application/json" -H "Content-Type: application/json" -d '{"x0": 1, "x1": 2}'
{"detail":"Error processing request: expected str, bytes or os.PathLike object, not NoneType"}
I'm also working in http with my server, could it be the reason of it not working ?
164 Views
0
Answers
one year ago
one year ago