Observers
Some checks failed
s434784-evaluation/pipeline/head This commit looks good
s434784-training/pipeline/head There was a failure building this commit

This commit is contained in:
Maciej Sobkowiak 2021-05-17 00:26:29 +02:00
parent e95bd5a701
commit 5a858f023b
3 changed files with 8 additions and 1 deletions

View File

@ -11,6 +11,8 @@ RUN pip3 install matplotlib
RUN pip3 install numpy RUN pip3 install numpy
RUN pip3 install tensorflow RUN pip3 install tensorflow
RUN pip3 install sklearn RUN pip3 install sklearn
RUN pip3 install sacred
RUN pip3 install pymongo
WORKDIR /app WORKDIR /app

View File

@ -7,9 +7,12 @@ from tensorflow.keras.layers.experimental import preprocessing
from sacred import Experiment from sacred import Experiment
from sacred.observers import FileStorageObserver from sacred.observers import FileStorageObserver
from sklearn.metrics import mean_squared_error from sklearn.metrics import mean_squared_error
from sacred.observers import MongoObserver
ex = Experiment("434784_sacred_scopes", interactive=True) ex = Experiment("434784_sacred_scopes", interactive=True)
ex.observers.append(FileStorageObserver('sacred_runs')) ex.observers.append(FileStorageObserver('sacred_runs'))
# ex.observers.append(MongoObserver(
# url='mongodb://mongo_user:mongo_password_IUM_2021@localhost:27017', db_name='sacred'))
@ex.config @ex.config

View File

@ -36,8 +36,9 @@ pipeline {
def image = docker.build('dock') def image = docker.build('dock')
image.inside{ image.inside{
sh 'chmod +x training.py' sh 'chmod +x training.py'
sh 'chmod +x sacred_training.py'
sh 'python3 training.py ${EPOCHS} ${BATCH_SIZE}' sh 'python3 training.py ${EPOCHS} ${BATCH_SIZE}'
sh 'python3 sacred_training.py'
} }
} }
} }
@ -45,6 +46,7 @@ pipeline {
stage('archive-model') { stage('archive-model') {
steps{ steps{
archiveArtifacts 'suicide_model.h5' archiveArtifacts 'suicide_model.h5'
archiveArtifacts 'sacred_runs/**'
} }
} }
stage('send-mail') { stage('send-mail') {