From 698bbe2ffb0b94da5447110af97ed1086b1d9a5e Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Wed, 22 Mar 2023 17:45:06 +0000 Subject: [PATCH] start working on plotting script, but it isn't finished yet --- aimodel/src/plot_metrics.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 aimodel/src/plot_metrics.py diff --git a/aimodel/src/plot_metrics.py b/aimodel/src/plot_metrics.py new file mode 100644 index 0000000..a050d6b --- /dev/null +++ b/aimodel/src/plot_metrics.py @@ -0,0 +1,19 @@ +import os +import seaborn as sns +import pandas as pd + +def plot_metric(train, val, name, dir_output): + plt.plot(train, label=f"train_{name}") + plt.plot(val, label=f"val_{name}") + plt.title(name) + plt.xlabel("epoch") + plt.ylabel(name) + plt.savefig(os.path.join(dir_output, f"{name}.png")) + plt.close() + +FILEPATH_INPUT = os.environ["INPUT"] +DIRPATH_OUTPUT = os.environ["OUTPUT"] if "OUTPUT" in os.environ else os.getcwd() + + +df = pd.read_csv(FILEPATH_INPUT) +