fix(eval): use reload() with explicit checkpoint path instead of load()
load() hardcodes best_policy.pt but PPO trainer saves as best_ppo.pt, causing the model to never load during eval. reload() accepts an explicit path.
This commit is contained in:
1 parent
aec1896094
commit
cf2d7ed806
1 file changed
+2
-3
@@ -219,9 +219,8 @@ class ForgeEvaluator:
|
||||
embeddings_dir=self.cfg.embeddings_dir,
|
||||
device=self.cfg.device,
|
||||
)
|
||||
# Override the default checkpoint filename with the exact path
|
||||
svc.checkpoint_dir = str(Path(self.cfg.checkpoint_path).parent)
|
||||
ok = svc.load()
|
||||
# Use reload() with explicit checkpoint path (load() hardcodes best_policy.pt)
|
||||
ok = svc.reload(self.cfg.checkpoint_path)
|
||||
if not ok:
|
||||
logger.warning("[Eval] Policy service load failed — entropy/latency metrics unavailable")
|
||||
return svc
|
||||
|
||||
Reference in new issue
Block a user