mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-04 12:42:51 +08:00
parent
0e08c209c4
commit
d5ca8763ea
@ -52,6 +52,6 @@ def plot_loss(save_dictionary: os.PathLike, keys: List[str] = ["loss"]) -> None:
|
|||||||
plt.xlabel("step")
|
plt.xlabel("step")
|
||||||
plt.ylabel(key)
|
plt.ylabel(key)
|
||||||
plt.legend()
|
plt.legend()
|
||||||
figure_path = os.path.join(save_dictionary, "training_{}.png".format(key.replace(os.path.sep, "_")))
|
figure_path = os.path.join(save_dictionary, "training_{}.png".format(key.replace("/", "_")))
|
||||||
plt.savefig(figure_path, format="png", dpi=100)
|
plt.savefig(figure_path, format="png", dpi=100)
|
||||||
print("Figure saved at:", figure_path)
|
print("Figure saved at:", figure_path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user