diff --git a/torchtune/_cli/download.py b/torchtune/_cli/download.py index f8c8d1e81d..f22e16e3ee 100644 --- a/torchtune/_cli/download.py +++ b/torchtune/_cli/download.py @@ -207,13 +207,6 @@ def _download_from_kaggle(self, args: argparse.Namespace) -> None: try: output_dir = model_download(model_handle) - # save the repo_id. This is necessary because the download step is a separate command - # from the rest of the CLI. When saving a model adapter, we have to add the repo_id - # to the adapter config. - file_path = os.path.join(output_dir, REPO_ID_FNAME + ".json") - with open(file_path, "w") as json_file: - json.dump({"repo_id": args.repo_id}, json_file, indent=4) - print( "Successfully downloaded model repo and wrote to the following locations:", *list(Path(output_dir).iterdir()), diff --git a/torchtune/training/checkpointing/_checkpointer.py b/torchtune/training/checkpointing/_checkpointer.py index 2e42433c69..48aa57e846 100644 --- a/torchtune/training/checkpointing/_checkpointer.py +++ b/torchtune/training/checkpointing/_checkpointer.py @@ -827,7 +827,7 @@ def save_checkpoint( state_dict[ training.ADAPTER_CONFIG ] = convert_weights.tune_to_peft_adapter_config( - state_dict[training.ADAPTER_CONFIG], + adapter_config=state_dict[training.ADAPTER_CONFIG], base_model_name_or_path=self.repo_id, )