mlflow save model
Some checks failed
s434765-training/pipeline/head There was a failure building this commit

This commit is contained in:
Karolina Oparczyk 2021-05-22 17:57:16 +02:00
parent d46f43b602
commit 8bb7dab2d8
3 changed files with 4 additions and 3 deletions

View File

@ -16,7 +16,7 @@ node {
} }
stage('Clone repo') { stage('Clone repo') {
/* try {*/ docker.image("karopa/ium:30").inside { /* try {*/ docker.image("karopa/ium:31").inside {
stage('Test') { stage('Test') {
checkout([$class: 'GitSCM', branches: [[name: '*/mlflow']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]]) checkout([$class: 'GitSCM', branches: [[name: '*/mlflow']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s434765/ium_434765']]])
copyArtifacts fingerprintArtifacts: true, projectName: 's434765-create-dataset', selector: buildParameter("BUILD_SELECTOR") copyArtifacts fingerprintArtifacts: true, projectName: 's434765-create-dataset', selector: buildParameter("BUILD_SELECTOR")
@ -24,6 +24,7 @@ node {
#!/usr/bin/env bash #!/usr/bin/env bash
chmod 777 neural_network.sh chmod 777 neural_network.sh
./neural_network.sh $EPOCHS | tee output.txt ./neural_network.sh $EPOCHS | tee output.txt
mlflow run ium_434765 -e main
''' '''
archiveArtifacts 'output.txt' archiveArtifacts 'output.txt'
archiveArtifacts 'model/**/*.*' archiveArtifacts 'model/**/*.*'

View File

@ -1,7 +1,7 @@
name: tutorial name: tutorial
docker_env: docker_env:
image: karopa/ium:30 image: karopa/ium:31
entry_points: entry_points:
main: main:

View File

@ -73,4 +73,4 @@ with mlflow.start_run() as run:
"channel_title", "views", "likes", "dislikes", "channel_title", "views", "likes", "dislikes",
"comment_count"]).dropna() "comment_count"]).dropna()
X_test = data.loc[:, data.columns == "views"].astype(int) X_test = data.loc[:, data.columns == "views"].astype(int)
mlflow.keras.save_model(model, "model", signature=signature, input_example=X_test) mlflow.keras.save_model(model, "model", registered_model_name="model", signature=signature, input_example=X_test)