update jenkinsfile_train-sacred, dllib-mlflow.py
This commit is contained in:
parent
671d474210
commit
aa04c968ed
@ -20,7 +20,7 @@ from sacred.observers import MongoObserver
|
|||||||
|
|
||||||
# EPOCHS = int(sys.argv[1])
|
# EPOCHS = int(sys.argv[1])
|
||||||
|
|
||||||
#
|
# mlflow.set_tracking_uri("http://172.17.0.1:5000")
|
||||||
mlflow.set_experiment("s444356")
|
mlflow.set_experiment("s444356")
|
||||||
|
|
||||||
class Model(nn.Module):
|
class Model(nn.Module):
|
||||||
@ -307,21 +307,13 @@ def my_main(epochs):
|
|||||||
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
|
tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
|
||||||
# print(tracking_url_type_store)
|
# 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":
|
if tracking_url_type_store != "file":
|
||||||
mlflow.pytorch.log_model(model, "model", registered_model_name="s444356", signature=siganture,
|
mlflow.pytorch.log_model(model, "model", registered_model_name="s444356", signature=siganture,
|
||||||
input_example=input_example)
|
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):
|
for epoch in range(1, epochs + 1):
|
||||||
print("Epoch #", epoch)
|
print("Epoch #", epoch)
|
||||||
|
@ -17,7 +17,6 @@ pipeline {
|
|||||||
stage('Script'){
|
stage('Script'){
|
||||||
steps {
|
steps {
|
||||||
copyArtifacts filter: '*', projectName: 's444356-create-dataset'
|
copyArtifacts filter: '*', projectName: 's444356-create-dataset'
|
||||||
sh 'rm -r my_model'
|
|
||||||
sh "python Biblioteka_DL/dllib-mlflow.py $EPOCHS"
|
sh "python Biblioteka_DL/dllib-mlflow.py $EPOCHS"
|
||||||
archiveArtifacts artifacts: 'games_model.pkl'
|
archiveArtifacts artifacts: 'games_model.pkl'
|
||||||
sh 'ls -al'
|
sh 'ls -al'
|
||||||
|
Loading…
Reference in New Issue
Block a user