From d703a9eec2403fd15fc3553c279e8d0cf5c03374 Mon Sep 17 00:00:00 2001 From: Kornelia Girejko Date: Sun, 15 May 2022 22:50:41 +0200 Subject: [PATCH] Zaktualizuj 'train-mlflow.py' --- train-mlflow.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/train-mlflow.py b/train-mlflow.py index 1d56809..7a8b5fc 100644 --- a/train-mlflow.py +++ b/train-mlflow.py @@ -104,17 +104,17 @@ def my_main(epochs): #result = open("output",'w+') #result.write(f'{y_predicted}') - + print(np.array(X_testing[0])) - input_example = np.array(X_testing[0]) - siganture = mlflow.models.signature.infer_signature(np.array(X_training), np.array(y_predicted_train)) - tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme + #input_example = np.array(X_testing[0]) + #siganture = mlflow.models.signature.infer_signature(np.array(X_training), np.array(y_predicted_train)) + #tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme - if tracking_url_type_store != "file": - mlflow.pytorch.log_model(model, "model_new", registered_model_name="478815", signature=siganture, - input_example=input_example) - else: - mlflow.pytorch.log_model(model, "model_new", signature=siganture, input_example=input_example) + #if tracking_url_type_store != "file": + # mlflow.pytorch.log_model(model, "model_new", registered_model_name="478815", signature=siganture, + # input_example=input_example) + #else: + # mlflow.pytorch.log_model(model, "model_new", signature=siganture, input_example=input_example) #mlflow.pytorch.save_model(model, "model_new", signature=siganture, input_example=input_example) rmse = mean_squared_error(y_testing, y_predicted)