From ff5a91b1a64c871905990c66b8d5bd2fbc6c0e1d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:51:15 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pvnet/models/base_model.py | 4 ++-- scripts/checkpoint_to_huggingface.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pvnet/models/base_model.py b/pvnet/models/base_model.py index c01c912a..7044da8d 100644 --- a/pvnet/models/base_model.py +++ b/pvnet/models/base_model.py @@ -154,7 +154,7 @@ def get_data_config( ) return data_config_file - + def save_pretrained( self, save_directory: Union[str, Path], @@ -199,7 +199,7 @@ def save_pretrained( if isinstance(config, dict): (save_directory / CONFIG_NAME).write_text(json.dumps(config, indent=4)) <<<<<<< HEAD - + # Save cleaned out datapipes configuration file make_clean_data_config(data_config, save_directory / DATA_CONFIG_NAME) ======= diff --git a/scripts/checkpoint_to_huggingface.py b/scripts/checkpoint_to_huggingface.py index 8f6216fd..6691fb2c 100644 --- a/scripts/checkpoint_to_huggingface.py +++ b/scripts/checkpoint_to_huggingface.py @@ -58,8 +58,8 @@ def push_to_huggingface( checkpoint = torch.load(f"{checkpoint_dir_path}/last.ckpt") model.load_state_dict(state_dict=checkpoint["state_dict"]) - - # Check for data config + + # Check for data config data_config = f"{checkpoint_dir_path}/data_config.yaml" assert os.path.isfile(data_config)