start working on plotting script, but it isn't finished yet

This commit is contained in:
Starbeamrainbowlabs 2023-03-22 17:45:06 +00:00
parent 6b17d45aad
commit 698bbe2ffb
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -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)