Skip to content

Commit

Permalink
fix eval with model.weights as '' bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjin ZHU committed Dec 23, 2023
1 parent fe90644 commit f7c6fb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion efg/engine/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def resume_or_load(self, resume=False):
all_model_checkpoints = sorted(all_model_checkpoints, key=os.path.getmtime)

if len(all_model_checkpoints) > 0:
if self.config.model.weights is not None:
if self.config.model.weights not in ("", None):
matched = np.nonzero(
np.array([pts.endswith(self.config.model.weights.split("/")[-1]) for pts in all_model_checkpoints])
)[0]
Expand Down

0 comments on commit f7c6fb4

Please sign in to comment.