Log to url
All checks were successful
s444409-evaluation/pipeline/head This commit looks good
s444409-training/pipeline/head This commit looks good

This commit is contained in:
Marcin Kostrzewski 2022-05-11 20:01:48 +02:00
parent aa966f8960
commit e93d644059
2 changed files with 3 additions and 6 deletions

View File

@ -36,9 +36,6 @@ pipeline {
stage('Train model') { stage('Train model') {
steps { steps {
sh "python train_model.py -e ${params.EPOCHS} -b ${params.BATCHSIZE}" sh "python train_model.py -e ${params.EPOCHS} -b ${params.BATCHSIZE}"
archiveArtifacts artifacts: 'model_out', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mlruns/**', onlyIfSuccessful: true
sh 'rm -r mlruns'
} }
} }
stage('Evaluate model') { stage('Evaluate model') {

View File

@ -14,7 +14,7 @@ default_epochs = 5
device = "cuda" if torch.cuda.is_available() else "cpu" device = "cuda" if torch.cuda.is_available() else "cpu"
# mlflow.set_tracking_uri("http://172.17.0.1:5000") mlflow.set_tracking_uri("http://172.17.0.1:5000")
mlflow.set_experiment("s444409") mlflow.set_experiment("s444409")
@ -80,8 +80,8 @@ if __name__ == "__main__":
registered_model_name="s444409", registered_model_name="s444409",
signature=signature, signature=signature,
input_example=input_example, input_example=input_example,
extra_files=['model.py'] code_paths=['model.py']
) )
else: else:
mlflow.pytorch.log_model(model, "s444409", signature=signature, input_example=input_example, mlflow.pytorch.log_model(model, "s444409", signature=signature, input_example=input_example,
extra_files=['model.py']) code_paths=['model.py'])