Skip to content
Snippets Groups Projects
Commit 1e3beafe authored by kupper's avatar kupper
Browse files

Finetune slurm script and loss plot

parent 75de4530
No related branches found
No related tags found
No related merge requests found
...@@ -9,3 +9,4 @@ requests ...@@ -9,3 +9,4 @@ requests
tqdm tqdm
gensim gensim
accelerate accelerate
matplotlib
#!/bin/bash
#SBATCH --job-name=NEC_evaluation
#SBATCH --output=logs/NEC_evaluation_%j.txt
#SBATCH --ntasks=1
#SBATCH --time=24:00:00
#SBATCH --mem=8000
#SBATCH --mail-type=ALL
#SBATCH --mail-user=kupper@cl.uni-heidelberg.de
#SBATCH --partition=students
#SBATCH --cpus-per-task=4
#SBATCH --qos=batch
#SBATCH --gres=gpu
export PYTHONUNBUFFERED=1
srun python3 -m src.experiments.NEC_evaluation.evaluation
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#SBATCH --job-name=finetune_T5 #SBATCH --job-name=finetune_T5
#SBATCH --output=logs/finetune_T5_%j.txt #SBATCH --output=logs/finetune_T5_%j.txt
#SBATCH --ntasks=1 #SBATCH --ntasks=1
#SBATCH --time=1:00:00 #SBATCH --time=24:00:00
#SBATCH --mem=8000 #SBATCH --mem=8000
#SBATCH --mail-type=ALL #SBATCH --mail-type=ALL
#SBATCH --mail-user=kupper@cl.uni-heidelberg.de #SBATCH --mail-user=kupper@cl.uni-heidelberg.de
...@@ -13,4 +13,4 @@ ...@@ -13,4 +13,4 @@
#SBATCH --gres=gpu #SBATCH --gres=gpu
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
srun python3 -m src.experiments.finetune_T5 srun python3 -m src.experiments.finetune_T5.finetune_T5
import pandas as pd
import matplotlib.pyplot as plt
df = pd.read_csv("eval_loss.csv")
print(df.head())
plt.figure(figsize=(10,5))
plt.plot(df["epoch"], df["eval_loss"])
plt.xlabel("Epoch")
plt.ylabel("Eval Loss")
plt.title("T5 finetuning training curve")
plt.legend()
plt.grid(True)
plt.savefig("eval_loss.pdf")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment