fix
This commit is contained in:
parent
e2bddf43e2
commit
653939737b
@ -19,7 +19,7 @@ pipeline {
|
||||
}
|
||||
stage('copy_artifacts') {
|
||||
steps {
|
||||
copyArtifacts filter: 'adult_test.csv,adult_dev.csv,adult_train.csv', fingerprintArtifacts: true, projectName: 'z-s444439-create-dataset', selector: workspace()
|
||||
copyArtifacts filter: 'X_test.csv,X_dev.csv,X_train.csv', fingerprintArtifacts: true, projectName: 'z-s444439-create-dataset', selector: workspace()
|
||||
}
|
||||
}
|
||||
stage('Docker') {
|
||||
|
@ -3,10 +3,17 @@ import numpy as np
|
||||
import tensorflow as tf
|
||||
import pandas as pd
|
||||
|
||||
test_data = pd.read_csv("adult_test.csv")
|
||||
data = tf.keras.models.load_model('model')
|
||||
|
||||
model = keras.models.load_model("model.h5")
|
||||
x_to_test = pd.read_csv('./X_test.csv')
|
||||
y_to_test = pd.read_csv('./Y_test.csv')
|
||||
|
||||
predictions = model.predict(test_data)
|
||||
accu = data.evaluate(x_to_test, y_to_test)
|
||||
|
||||
np.savetxt("predictions.csv", predictions, delimiter=",")
|
||||
|
||||
with open('metrics.csv', 'a') as file:
|
||||
file.write(f'1,{accu}\n')
|
||||
|
||||
pre = data.predict(x_to_test)
|
||||
|
||||
pre.tofile('prediction.csv', sep=',', format='%s')
|
||||
|
Loading…
Reference in New Issue
Block a user