push
This commit is contained in:
parent
9050bcb8e7
commit
2a3bd587ed
85
Jenkinsfile
vendored
85
Jenkinsfile
vendored
@ -1,65 +1,34 @@
|
||||
pipeline {
|
||||
agent {
|
||||
dockerfile {
|
||||
filename 'Dockerfile'
|
||||
args '-v /tmp:/tmp'
|
||||
}
|
||||
agent {
|
||||
dockerfile true
|
||||
}
|
||||
|
||||
parameters{
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying artifacts',
|
||||
name: 'WHICH_BUILD'
|
||||
parameters {
|
||||
buildSelector(
|
||||
defaultSelector: lastSuccessful(),
|
||||
description: 'Which build to use for copying training artifacts',
|
||||
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 {
|
||||
mail body: 'FAILURE TRAINING', subject: 's434695', to: '26ab8f35.uam.onmicrosoft.com@emea.teams.ms'
|
||||
}
|
||||
stages {
|
||||
stage('copy artifacts')
|
||||
{
|
||||
steps
|
||||
{
|
||||
copyArtifacts(fingerprintArtifacts: true, projectName: 's434788-training/master', selector: buildParameter('WHICH_BUILD_TRAIN'))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
stage('predict')
|
||||
{
|
||||
steps
|
||||
{
|
||||
catchError {
|
||||
sh 'python3 predict434788.py'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -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'
|
@ -1,10 +0,0 @@
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python=3.8.5
|
||||
- pip
|
||||
- pip:
|
||||
- mlflow
|
||||
- tensorflow==2.4.1
|
||||
name: mlflow-env
|
@ -1 +0,0 @@
|
||||
tensorflow.keras
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
||||
tf
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user