update jenkinsfile_train-sacred
Some checks failed
s444356-evaluation/pipeline/head This commit looks good
s444356-training/pipeline/head There was a failure building this commit

This commit is contained in:
Maciej Czajka 2022-05-11 17:38:43 +02:00
parent 8309c847c6
commit d0d8f295c7

View File

@ -20,7 +20,7 @@ from sacred.observers import MongoObserver
# EPOCHS = int(sys.argv[1])
# mlflow.set_tracking_uri("http://172.17.0.1:5000")
#
mlflow.set_experiment("s444356")
class Model(nn.Module):
@ -307,13 +307,21 @@ def my_main(epochs):
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
# print(tracking_url_type_store)
# if tracking_url_type_store != "file":
# mlflow.pytorch.log_model(model, "model", registered_model_name="s444356", signature=siganture,
# input_example=input_example)
# else:
# mlflow.pytorch.log_model(model, "model", signature=siganture, input_example=input_example)
# mlflow.pytorch.save_model(model, "my_model", signature=siganture, input_example=input_example)
mlflow.pytorch.log_model(model, "model", signature=siganture, input_example=input_example)
mlflow.pytorch.save_model(model, "my_model", signature=siganture, input_example=input_example)
mlflow.set_tracking_uri("http://172.17.0.1:5000")
if tracking_url_type_store != "file":
mlflow.pytorch.log_model(model, "model", registered_model_name="s444356", signature=siganture,
input_example=input_example)
else:
mlflow.pytorch.log_model(model, "model", signature=siganture, input_example=input_example)
mlflow.pytorch.save_model(model, "my_model", signature=siganture, input_example=input_example)
for epoch in range(1, epochs + 1):
print("Epoch #", epoch)