Jenkinsfile-training changed, automatic mail sending
Some checks failed
s434742-training/pipeline/head There was a failure building this commit
Some checks failed
s434742-training/pipeline/head There was a failure building this commit
This commit is contained in:
parent
2d49376c32
commit
b5daa4256d
@ -16,7 +16,7 @@ pipeline {
|
||||
name: 'BATCH_SIZE'
|
||||
)
|
||||
string(
|
||||
defaultValue: '15',
|
||||
defaultValue: '10',
|
||||
description: 'epochs',
|
||||
name: 'EPOCHS'
|
||||
)
|
||||
@ -27,17 +27,25 @@ pipeline {
|
||||
copyArtifacts fingerprintArtifacts: true, projectName: 's434742-create-dataset', selector: buildParameter('BUILD_SELECTOR')
|
||||
}
|
||||
}
|
||||
stage('Sh script') {
|
||||
stage('training') {
|
||||
steps {
|
||||
sh 'chmod +x run_training-script.sh'
|
||||
sh './run_training-script.sh ${EPOCHS} ${BATCH_SIZE}'
|
||||
sh 'chmod +x avocado-preprocessing.py'
|
||||
sh 'python3 avocado-preprocessing.py ${EPOCHS} ${BATCH_SIZE}'
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
stage('Archive artifacts') {
|
||||
stage('archiveArtifacts') {
|
||||
steps{
|
||||
archiveArtifacts artifacts: 'model_movies'
|
||||
archiveArtifacts 'avocado-model.h5'
|
||||
}
|
||||
}
|
||||
|
||||
stage('sendMail') {
|
||||
steps{
|
||||
emailext body: currentBuild.result ?: 'SUCCESS',
|
||||
subject: 's434742',
|
||||
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +99,7 @@ epochs = int(sys.argv[1])
|
||||
batch_size = int(sys.argv[2])
|
||||
|
||||
model.fit(X_train, y_train, epochs=epochs, batch_size=batch_size, validation_data=(X_test, y_test))
|
||||
model.save('avocado-model.h5')
|
||||
|
||||
# predict
|
||||
predictions = model.predict(X_test)
|
||||
|
Loading…
Reference in New Issue
Block a user