Skip to content

Commit

Permalink
Update eval.py
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead authored Feb 21, 2025
1 parent 0a7838f commit 78b82da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flowdock/eval.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

import hydra
import lightning as L
import lovely_tensors as lt
import rootutils
import torch
Expand Down Expand Up @@ -56,6 +57,10 @@ def evaluate(cfg: DictConfig) -> Tuple[Dict[str, Any], Dict[str, Any]]:
assert cfg.ckpt_path, "Please provide a checkpoint path to evaluate!"
assert os.path.exists(cfg.ckpt_path), f"Checkpoint path {cfg.ckpt_path} does not exist!"

# set seed for random number generators in pytorch, numpy and python.random
if cfg.get("seed"):
L.seed_everything(cfg.seed, workers=True)

log.info(
f"Setting `float32_matmul_precision` to {cfg.model.cfg.task.float32_matmul_precision}."
)
Expand Down

0 comments on commit 78b82da

Please sign in to comment.