Skip to content

Commit

Permalink
Fix direction of loss assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaskom committed Feb 7, 2024
1 parent 5bfe720 commit 9db01a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ci/check_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
results_text = m.group(1).strip().replace(" ", "")

results = pd.read_table(StringIO(results_text), sep="|")
print(results) # TODO debugging
train_loss = float(results["TrainingLoss"].iloc[-1])
val_loss = float(results["ValidationLoss"].iloc[-1])

print("Loss: {train_loss:.2f} (training), {val_loss:.2f} (validation)")
sys.exit(val_loss < 0.25) # Arbitrary threshold
print(f"Loss: {train_loss:.2f} (training), {val_loss:.2f} (validation)")
sys.exit(val_loss > 0.25) # Arbitrary threshold

0 comments on commit 9db01a4

Please sign in to comment.