Skip to content

Commit

Permalink
handle Mixtral config
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesfrye committed May 15, 2024
1 parent a90a537 commit 84ee903
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ci/check_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


if __name__ == "__main__":

with open(".last_run_name", "r") as f:
run_name = f.read().strip()

Expand All @@ -27,8 +26,9 @@
train_loss = float(results["TrainingLoss"].iloc[-1])
val_loss = float(results["ValidationLoss"].iloc[-1])

# Arbitrary threshold
max_loss = 10 if b"Mixtral" in contents else 0.25
# maximum loss for training, minimum loss for validation
max_loss = 1e-1 if b"Mixtral" in contents else 1e-2
min_loss = 2 if b"Mixtral" in contents else 0.1

print(f"Loss: {train_loss:.2f} (training), {val_loss:.2f} (validation)")
sys.exit(val_loss > max_loss)
sys.exit(train_loss > max_loss or val_loss > max_loss)
1 change: 1 addition & 0 deletions ci/prep_for_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def main(config: str, data: str):
cfg["val_set_size"] = val_set_size
cfg["num_epochs"] = num_epochs
cfg["eval_steps"] = num_epochs
cfg.pop("evals_per_epoch", None) # incompatible with eval_steps

with open(config, "w") as f:
yaml.dump(cfg, f)
Expand Down

0 comments on commit 84ee903

Please sign in to comment.