From 9ac0678cb0e3433d71fc65de6021d35f675d2af7 Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Fri, 4 Jun 2021 16:07:32 +0200 Subject: [PATCH] mlflow signature update --- learning/ml-mlflow.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/learning/ml-mlflow.py b/learning/ml-mlflow.py index e880fca..116a085 100644 --- a/learning/ml-mlflow.py +++ b/learning/ml-mlflow.py @@ -72,8 +72,10 @@ with mlflow.start_run(): mlflow.log_param("test size", testset.size) mlflow.log_param("epochs", EPOCHS) + predicted = model(Variable(torch.from_numpy(x_train))).data.numpy() + signature = mlflow.models.signature.infer_signature( - x_train.values, model.predict(x_train.values)) + x_train.values, predicted) mlflow.set_experiment("s434700") tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme