Fix metrics
Some checks failed
s434704-training/pipeline/head There was a failure building this commit

This commit is contained in:
Wojciech Jarmosz 2021-05-14 04:16:17 +02:00
parent e67ad3779c
commit 6b8c43b7c9
2 changed files with 3 additions and 6 deletions

View File

@ -27,7 +27,7 @@ pipeline {
} }
stage('Save metrics to bulk file & create chart') { stage('Save metrics to bulk file & create chart') {
steps{ steps{
sh "if [ -f "single_metrics.txt" ]; "${env.BUILD_ID} ${cat single_metrics.txt}" >> bulk_metrics.txt fi" sh "if [ -f "rmse.txt" ]; "${env.BUILD_ID} ${cat rmse.txt}" >> bulk_metrics.txt fi"
archiveArtifacts 'bulk_metrics.txt' archiveArtifacts 'bulk_metrics.txt'
sh "python3 create_chart.py" sh "python3 create_chart.py"
archiveArtifacts 'chart.png' archiveArtifacts 'chart.png'

View File

@ -20,9 +20,6 @@ model = tf.keras.models.load_model('linear_regression.h5')
scores = model.evaluate(x=test_X, scores = model.evaluate(x=test_X,
y=test_Y) y=test_Y)
with open('single_metrics.txt', 'w') as file: with open('rmse.txt', 'w') as file:
for idx, score in enumerate(scores): for idx, score in enumerate(scores):
if idx == 0: file.write(str(score))
file.write("Recall: " + str(score) + "\n")
if idx == 1:
file.write("RMSE: " + str(score) + "\n")