feat: dodano drugiego obserwatora do sacred - FileObserver
This commit is contained in:
parent
ef09e74910
commit
786ce59724
@ -17,6 +17,9 @@ from sacred.observers import FileStorageObserver
|
||||
ex = Experiment('z-s487175-training', interactive=True, save_git_info=False)
|
||||
ex.observers.append(MongoObserver(url='mongodb://admin:IUM_2021@172.17.0.1:27017', db_name='sacred'))
|
||||
|
||||
# Init FileStorageObserver
|
||||
ex.observers.append(FileStorageObserver.create('artifacts-sacred'))
|
||||
|
||||
@ex.config
|
||||
def config():
|
||||
# Wczytanie parametru epochs
|
||||
@ -119,8 +122,10 @@ def main(epochs, _run):
|
||||
ex.add_artifact('dane/diamonds_dev.csv')
|
||||
|
||||
# Zapisanie - metryki
|
||||
ex.log_scalar('accuracy', history.history['accuracy'][-1])
|
||||
ex.log_scalar('val_accuracy', history.history['val_accuracy'][-1])
|
||||
for key in history.history.keys():
|
||||
values = history.history[key]
|
||||
for value in values:
|
||||
ex.log_scalar(key, value)
|
||||
|
||||
ex.run()
|
||||
|
||||
|
@ -29,7 +29,8 @@ pipeline{
|
||||
stage('Archive model'){
|
||||
steps{
|
||||
sh "docker cp \$(docker ps -l -q):/app/model_with_data.pickle ${env.WORKSPACE}"
|
||||
archiveArtifacts artifacts: 'model_with_data.pickle', fingerprint: true
|
||||
sh "docker cp \$(docker ps -l -q):/app/artifacts-secred ${env.WORKSPACE}"
|
||||
archiveArtifacts artifacts: 'model_with_data.pickle, artifacts-secred/**', fingerprint: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user