training test

This commit is contained in:
Filip Izydorczyk 2021-06-04 18:10:34 +02:00
parent fcf7d19cea
commit 89cb44bbb6
2 changed files with 4 additions and 3 deletions

View File

@ -23,6 +23,7 @@ pipeline {
sh 'python ./learning/ml.py' sh 'python ./learning/ml.py'
sh "export MLFLOW_TRACKING_URI=http://172.17.0.1:5000" sh "export MLFLOW_TRACKING_URI=http://172.17.0.1:5000"
sh "python ./learning/ml-mlflow.py" sh "python ./learning/ml-mlflow.py"
sh "ls -l"
} }
} }
stage('archiveArtifacts') { stage('archiveArtifacts') {

View File

@ -80,10 +80,10 @@ with mlflow.start_run():
mlflow.set_experiment("s434700") mlflow.set_experiment("s434700")
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.pytorch.log_model(model, "model.pt", registered_model_name="s434700", signature=signature, mlflow.pytorch.log_model(model, "cs_model", registered_model_name="s434700", signature=signature,
input_example=test_input) input_example=test_input)
else: else:
mlflow.pytorch.log_model(model, "model.pt", mlflow.pytorch.log_model(model, "cs_model",
signature=signature, input_example=test_input) signature=signature, input_example=test_input)
mlflow.pytorch.save_model( mlflow.pytorch.save_model(
model, "model.pt", signature=signature, input_example=test_input) model, "cs_model", signature=signature, input_example=test_input)