mlflow attempting to fix a build error

This commit is contained in:
Kamila 2022-05-15 11:47:57 +02:00
parent d8e44b54ad
commit bfc88a043a
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,6 @@ pipeline {
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh 'python3 ./nn_train_mlflow.py' sh 'python3 ./nn_train_mlflow.py'
archiveArtifacts artifacts: 'mlruns/**' archiveArtifacts artifacts: 'mlruns/**'
sh 'rm -r my_model_mlflow'
} }
} }
} }

View File

@ -12,8 +12,9 @@ import sys
from urllib.parse import urlparse from urllib.parse import urlparse
mlflow.set_experiment("s444517")
mlflow.set_tracking_uri("http://172.17.0.1:5000") mlflow.set_tracking_uri("http://172.17.0.1:5000")
mlflow.set_experiment("s_444517")
# reading data # reading data
def read_data(): def read_data():
@ -102,7 +103,7 @@ with mlflow.start_run():
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
if tracking_url_type_store != "file": if tracking_url_type_store != "file":
mlflow.sklearn.log_model(model, "my_model_mlflow", registered_model_name="s444517", signature=signature, input_example=input_example) mlflow.sklearn.log_model(model, "my_model_mlflow", registered_model_name="s_444517", signature=signature, input_example=input_example)
else: else:
mlflow.sklearn.log_model(model, "my_model_mlflow", signature=signature, input_example=input_example) mlflow.sklearn.log_model(model, "my_model_mlflow", registered_model_name="s_444517", signature=signature, input_example=input_example)
mlflow.keras.save_model(model, "my_model_mlflow", signature=signature, input_example=input_example) mlflow.keras.save_model(model, "my_model_mlflow", signature=signature, input_example=input_example)