2023-05-10 20:29:50 +02:00
|
|
|
import pandas
|
|
|
|
import os
|
|
|
|
|
|
|
|
from keras.applications.densenet import layers
|
|
|
|
|
|
|
|
from sklearn.model_selection import train_test_split
|
|
|
|
import tensorflow
|
|
|
|
|
2023-05-11 00:31:05 +02:00
|
|
|
build_number = int(os.environ['BUILD_NUMBER'])
|
2023-05-10 20:29:50 +02:00
|
|
|
|
2023-05-10 23:09:01 +02:00
|
|
|
reloaded = tensorflow.keras.models.load_model('test')
|
2023-05-10 20:22:22 +02:00
|
|
|
|
|
|
|
x_to_test = pandas.read_csv('./X_test.csv')
|
|
|
|
y_to_test = pandas.read_csv('./Y_test.csv')
|
|
|
|
|
2023-05-10 20:32:32 +02:00
|
|
|
accu = reloaded.evaluate(x_to_test, y_to_test)
|
2023-05-10 20:22:22 +02:00
|
|
|
|
2023-05-11 00:31:05 +02:00
|
|
|
|
2023-05-10 23:49:08 +02:00
|
|
|
with open('metrics.csv', 'a') as file:
|
2023-05-11 00:31:05 +02:00
|
|
|
file.write(f'{build_number},{accu}\n')
|
2023-05-10 20:41:43 +02:00
|
|
|
|
2023-05-10 20:32:32 +02:00
|
|
|
pre = reloaded.predict(x_to_test)
|
2023-05-10 20:41:43 +02:00
|
|
|
|
2023-05-10 20:49:17 +02:00
|
|
|
pre.tofile('prediction.csv', sep=',', format='%s')
|