Spaces:
Running
Running
OliverPerrin commited on
Commit ·
2ce1629
1
Parent(s): 6a7a381
Minor fixes to Gradio and visualization scripts
Browse files- scripts/demo_gradio.py +2 -1
- scripts/visualize_training.py +1 -2
scripts/demo_gradio.py
CHANGED
|
@@ -49,7 +49,8 @@ EVAL_REPORT_PATH = OUTPUTS_DIR / "evaluation_report.json"
|
|
| 49 |
TRAINING_HISTORY_PATH = OUTPUTS_DIR / "training_history.json"
|
| 50 |
|
| 51 |
# Emotion display - clean labels without emojis for research aesthetic
|
| 52 |
-
EMOTION_LABELS = {
|
|
|
|
| 53 |
"sadness": "Sadness", "surprise": "Surprise", "neutral": "Neutral",
|
| 54 |
"admiration": "Admiration", "amusement": "Amusement", "annoyance": "Annoyance",
|
| 55 |
"approval": "Approval", "caring": "Caring", "confusion": "Confusion",
|
|
|
|
| 49 |
TRAINING_HISTORY_PATH = OUTPUTS_DIR / "training_history.json"
|
| 50 |
|
| 51 |
# Emotion display - clean labels without emojis for research aesthetic
|
| 52 |
+
EMOTION_LABELS = {
|
| 53 |
+
"joy": "Joy", "love": "Love", "anger": "Anger", "fear": "Fear",
|
| 54 |
"sadness": "Sadness", "surprise": "Surprise", "neutral": "Neutral",
|
| 55 |
"admiration": "Admiration", "amusement": "Amusement", "annoyance": "Annoyance",
|
| 56 |
"approval": "Approval", "caring": "Caring", "confusion": "Confusion",
|
scripts/visualize_training.py
CHANGED
|
@@ -410,7 +410,6 @@ def plot_learning_rate(run) -> None:
|
|
| 410 |
# Estimate total steps from training loss history
|
| 411 |
train_loss = client.get_metric_history(run.info.run_id, "train_total_loss")
|
| 412 |
if train_loss:
|
| 413 |
-
epochs_completed = len(train_loss)
|
| 414 |
# Estimate ~800 steps per epoch based on typical config
|
| 415 |
estimated_steps_per_epoch = 800
|
| 416 |
total_steps = max_epochs * estimated_steps_per_epoch
|
|
@@ -447,7 +446,7 @@ def plot_learning_rate(run) -> None:
|
|
| 447 |
transform=ax.transAxes, ha="right", va="bottom",
|
| 448 |
fontsize=9, color="gray", style="italic")
|
| 449 |
else:
|
| 450 |
-
steps = [m.step for m in lr_metrics]
|
| 451 |
values = [m.value for m in lr_metrics]
|
| 452 |
|
| 453 |
# Fill under curve for visual appeal
|
|
|
|
| 410 |
# Estimate total steps from training loss history
|
| 411 |
train_loss = client.get_metric_history(run.info.run_id, "train_total_loss")
|
| 412 |
if train_loss:
|
|
|
|
| 413 |
# Estimate ~800 steps per epoch based on typical config
|
| 414 |
estimated_steps_per_epoch = 800
|
| 415 |
total_steps = max_epochs * estimated_steps_per_epoch
|
|
|
|
| 446 |
transform=ax.transAxes, ha="right", va="bottom",
|
| 447 |
fontsize=9, color="gray", style="italic")
|
| 448 |
else:
|
| 449 |
+
steps = np.array([m.step for m in lr_metrics])
|
| 450 |
values = [m.value for m in lr_metrics]
|
| 451 |
|
| 452 |
# Fill under curve for visual appeal
|