This commit is contained in:
s434695 2021-05-23 23:39:25 +02:00
parent 9050bcb8e7
commit 2a3bd587ed
9 changed files with 27 additions and 92 deletions

81
Jenkinsfile vendored
View File

@ -1,65 +1,34 @@
pipeline { pipeline {
agent { agent {
dockerfile { dockerfile true
filename 'Dockerfile'
args '-v /tmp:/tmp'
}
} }
parameters{ parameters {
buildSelector( buildSelector(
defaultSelector: lastSuccessful(), defaultSelector: lastSuccessful(),
description: 'Which build to use for copying artifacts', description: 'Which build to use for copying training artifacts',
name: 'WHICH_BUILD' name: 'WHICH_BUILD_TRAIN'
) )
string(
defaultValue: '16',
description: 'batch size',
name: 'BATCH_SIZE'
)
string(
defaultValue: '15',
description: 'epochs',
name: 'EPOCHS'
)
}
stages {
stage('copy artifacts')
{
steps
{
copyArtifacts(fingerprintArtifacts: true, projectName: 's434695-create-dataset', selector: buildParameter('WHICH_BUILD'))
}
}
stage('train')
{
steps
{
sh 'python3 train.py ${BATCH_SIZE} ${EPOCHS}'
sh 'rm -r my_model'
sh 'python3 vgsales-mlflow.py'
}
}
stage('Archive artifacts') {
steps{
archiveArtifacts 'vgsales_model.h5'
archiveArtifacts 'my_runs/**/*'
archiveArtifacts 'my_model/**/*'
}
}
} }
post {
success {
mail body: 'SUCCESS TRAINING', subject: 's434695', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
}
failure { stages {
mail body: 'FAILURE TRAINING', subject: 's434695', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms' stage('copy artifacts')
} {
steps
{
copyArtifacts(fingerprintArtifacts: true, projectName: 's434788-training/master', selector: buildParameter('WHICH_BUILD_TRAIN'))
}
}
} stage('predict')
{
steps
{
catchError {
sh 'python3 predict434788.py'
}
}
}
}
} }

View File

@ -1,21 +0,0 @@
flavors:
keras:
data: data
keras_module: tensorflow.keras
keras_version: 2.4.0
save_format: tf
python_function:
data: data
env: conda.yaml
loader_module: mlflow.keras
python_version: 3.8.5
saved_input_example_info:
artifact_path: input_example.json
pandas_orient: split
type: dataframe
signature:
inputs: '[{"name": "NA_Sales", "type": "double"}, {"name": "EU_Sales", "type": "double"},
{"name": "JP_Sales", "type": "double"}, {"name": "Other_Sales", "type": "double"},
{"name": "Global_Sales", "type": "double"}]'
outputs: '[{"type": "long"}]'
utc_time_created: '2021-05-23 20:58:45.764716'

View File

@ -1,10 +0,0 @@
channels:
- defaults
- conda-forge
dependencies:
- python=3.8.5
- pip
- pip:
- mlflow
- tensorflow==2.4.1
name: mlflow-env

View File

@ -1 +0,0 @@
tensorflow.keras

Binary file not shown.

View File

@ -1 +0,0 @@
tf

File diff suppressed because one or more lines are too long