Skip to content

Commit

Permalink
adjust decorator order to accommodate older versions of python
Browse files Browse the repository at this point in the history
  • Loading branch information
speediedan committed Dec 20, 2023
1 parent 68470e1 commit 829c455
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 @@ -1362,8 +1362,8 @@ def gen_implicit_schedule(self, sched_dir: Union[str, os.PathLike]) -> None:
rank_zero_info(f"Generated default fine-tuning schedule '{default_ft_schedule}' for iterative fine-tuning")
self.ft_schedule = self.load_yaml_schedule(default_ft_schedule)

@rank_zero_only
@staticmethod
@rank_zero_only
def save_schedule(schedule_name: str, layer_config: Dict, dump_loc: Union[str, os.PathLike]) -> os.PathLike:
"""Save loaded or generated schedule to a directory to ensure reproducability.
Expand All @@ -1387,8 +1387,8 @@ def save_schedule(schedule_name: str, layer_config: Dict, dump_loc: Union[str, o
rank_zero_info(f"fine-tuning schedule dumped to {ft_schedule_yaml}.")
return ft_schedule_yaml

@rank_zero_only
@staticmethod
@rank_zero_only
def gen_ft_schedule(module: Module, dump_loc: Union[str, os.PathLike]) -> Optional[os.PathLike]:
"""Generate the default fine-tuning schedule using a naive, 2-parameters per-level heuristic.
Expand Down

0 comments on commit 829c455

Please sign in to comment.