handle coop model build
This commit is contained in:
parent
981ba97f9a
commit
eb1614b5e1
@ -15,7 +15,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage('training') {
|
stage('training') {
|
||||||
steps {
|
steps {
|
||||||
sh 'rm -rf country_vaccination'
|
sh 'rm -rf movies_imdb'
|
||||||
sh 'chmod +x pred_from_model.py'
|
sh 'chmod +x pred_from_model.py'
|
||||||
sh 'python3 pred_from_model.py'
|
sh 'python3 pred_from_model.py'
|
||||||
}
|
}
|
||||||
|
36
Jenkinsfile_mlflow_coop
Normal file
36
Jenkinsfile_mlflow_coop
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {dockerfile true}
|
||||||
|
parameters {
|
||||||
|
buildSelector(
|
||||||
|
defaultSelector: lastSuccessful(),
|
||||||
|
description: 'Which build to use for copying artifacts',
|
||||||
|
name: 'BUILD_SELECTOR'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('copyArtifacts') {
|
||||||
|
steps {
|
||||||
|
copyArtifacts fingerprintArtifacts: true, projectName: 's430705-training/master', selector: buildParameter('BUILD_SELECTOR')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('training') {
|
||||||
|
steps {
|
||||||
|
sh 'rm -rf movies_imdb'
|
||||||
|
sh 'chmod +x pred_from_mlflow_model.py'
|
||||||
|
sh 'python3 pred_from_mlflow_model.py'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('archiveArtifacts') {
|
||||||
|
steps{
|
||||||
|
archiveArtifacts 'movies_imdb/**'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('sendMail') {
|
||||||
|
steps{
|
||||||
|
emailext body: currentBuild.result ?: 'MLFLOW PREDICT SUCCESS',
|
||||||
|
subject: 's434804',
|
||||||
|
to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -57,10 +57,8 @@ if __name__ == "__main__":
|
|||||||
mlf.set_experiment("s434804")
|
mlf.set_experiment("s434804")
|
||||||
tracking_url_type_store = urlparse(mlf.get_tracking_uri()).scheme
|
tracking_url_type_store = urlparse(mlf.get_tracking_uri()).scheme
|
||||||
if tracking_url_type_store != "file":
|
if tracking_url_type_store != "file":
|
||||||
print("no file")
|
|
||||||
mlf.keras.log_model(model, "country_vaccination2", registered_model_name="s434804", signature=signature,
|
mlf.keras.log_model(model, "country_vaccination2", registered_model_name="s434804", signature=signature,
|
||||||
input_example=input_example)
|
input_example=input_example)
|
||||||
else:
|
else:
|
||||||
print("file")
|
|
||||||
mlf.keras.log_model(model, "vaccines_model", signature=signature, input_example=input_example)
|
mlf.keras.log_model(model, "vaccines_model", signature=signature, input_example=input_example)
|
||||||
mlf.keras.save_model(model, "country_vaccination", signature=signature, input_example=input_example)
|
mlf.keras.save_model(model, "country_vaccination", signature=signature, input_example=input_example)
|
Loading…
Reference in New Issue
Block a user