Skip to content

Commit

Permalink
make path equality check robust to different versions of fsspec
Browse files Browse the repository at this point in the history
  • Loading branch information
speediedan committed Nov 8, 2023
1 parent 99e873e commit 1729d6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/finetuning_scheduler/fts_supporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ def load_state_dict(self, state_dict: Dict[str, Any]) -> None:
if not self.finetuningscheduler_callback.epoch_transitions_only:
self.finetuningscheduler_callback.pl_module.trainer.early_stopping_callback.wait_count = 0
if self.finetuningscheduler_callback._fts_state._resume_fit_from_ckpt:
dirpath_from_ckpt = pathlib.Path(state_dict.get("dirpath", self.dirpath))
if self.dirpath == dirpath_from_ckpt:
dirpath_from_ckpt = state_dict.get("dirpath", self.dirpath)
if self.dirpath == dirpath_from_ckpt or self.dirpath == pathlib.Path(dirpath_from_ckpt):
self.best_k_models = state_dict.get("best_k_models", self.best_k_models)
self.kth_best_model_path = state_dict.get("kth_best_model_path", self.kth_best_model_path)
self.kth_value = state_dict.get("kth_value", self.kth_value)
Expand Down

0 comments on commit 1729d6b

Please sign in to comment.