diff --git a/Jenkinsfile_mlflow b/Jenkinsfile_mlflow index 5c1809f..c8346ce 100644 --- a/Jenkinsfile_mlflow +++ b/Jenkinsfile_mlflow @@ -34,7 +34,6 @@ pipeline { "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { sh 'python3 ./nn_train_mlflow.py' archiveArtifacts artifacts: 'mlruns/**' - sh 'rm -r my_model_mlflow' } } } diff --git a/nn_train_mlflow.py b/nn_train_mlflow.py index 653b0ac..803c35c 100644 --- a/nn_train_mlflow.py +++ b/nn_train_mlflow.py @@ -12,8 +12,9 @@ import sys from urllib.parse import urlparse -mlflow.set_experiment("s444517") mlflow.set_tracking_uri("http://172.17.0.1:5000") +mlflow.set_experiment("s_444517") + # reading data def read_data(): @@ -102,7 +103,7 @@ with mlflow.start_run(): tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme 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: - 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) \ No newline at end of file