Firs version o ex.9
This commit is contained in:
parent
3955e7ac20
commit
c9b0f021c1
@ -31,15 +31,14 @@ pipeline {
|
||||
steps
|
||||
{
|
||||
catchError {
|
||||
sh 'python3.8 Zadanie_06_and_07_training.py ${BATCH_SIZE} ${EPOCHS}'
|
||||
sh 'python3.8 Zadanie_08_and_09_MLflow.py ${BATCH_SIZE} ${EPOCHS}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Archive artifacts') {
|
||||
steps{
|
||||
archiveArtifacts 'wine_model.h5'
|
||||
archiveArtifacts 'my_runs/**'
|
||||
archiveArtifacts 'my_model/**'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,4 +8,4 @@ entry_points:
|
||||
parameters:
|
||||
batch_size: {type: int, default: 16}
|
||||
epochs: {type: int, default: 15}
|
||||
command: "python3 Zadanie_08_MLflow.py {batch_size} {epochs}"
|
||||
command: "python3 Zadanie_08_and_09_MLflow.py {batch_size} {epochs}"
|
@ -17,6 +17,7 @@ with mlflow.start_run():
|
||||
batch_param = int(sys.argv[1]) if len(sys.argv) > 1 else 16
|
||||
epoch_param = int(sys.argv[2]) if len(sys.argv) > 2 else 15
|
||||
|
||||
mlflow.set_experiment("s434788")
|
||||
mlflow.log_param("batch_size", batch_param)
|
||||
mlflow.log_param("epochs", epoch_param)
|
||||
|
||||
@ -69,4 +70,6 @@ with mlflow.start_run():
|
||||
|
||||
print(f"accuracy: {results}")
|
||||
|
||||
mlflow.log_metric("Accuracy", results)
|
||||
mlflow.log_metric("Accuracy", results)
|
||||
|
||||
mlflow.keras.save_model(NeuralModel, "my_model")
|
Loading…
Reference in New Issue
Block a user