From 3c26863f7358d2c7efe9a8ed61c6455bdf00f3b5 Mon Sep 17 00:00:00 2001 From: Kacper Dudzic Date: Mon, 25 Apr 2022 23:27:04 +0200 Subject: [PATCH] Update 'evaluate.py' --- evaluate.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/evaluate.py b/evaluate.py index bc1d72d..0f83c2d 100644 --- a/evaluate.py +++ b/evaluate.py @@ -20,13 +20,11 @@ test_results = model.evaluate( # Zapis wartoĊ›ci liczbowej metryki do pliku with open('eval_results.txt', 'a+') as f: - f.write(str(test_results)) + f.write(str(test_results) + '\n') # Wygenerowanie i zapisanie do pliku wykresu with open('eval_results.txt') as f: - scores = [] - for line in f: - scores.append(float(line)) + scores = [float(line) for line in f if line] builds = list(range(1, len(scores) + 1)) plot = plt.plot(builds, scores)