From 80222f5b7fcc4821cf5e0b6da4aba3b066cf3031 Mon Sep 17 00:00:00 2001 From: James Fulton <41546094+dfulu@users.noreply.github.com> Date: Fri, 20 Oct 2023 12:26:23 +0100 Subject: [PATCH] script moved to pvnet_app (#87) * script moved to pvnet_app * add req --- requirements.txt | 1 + scripts/cache_default_models.py | 35 --------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 scripts/cache_default_models.py diff --git a/requirements.txt b/requirements.txt index 8024dae8..c7740110 100644 --- a/requirements.txt +++ b/requirements.txt @@ -24,3 +24,4 @@ omegaconf hydra-core python-dotenv hydra-optuna-sweeper +rich diff --git a/scripts/cache_default_models.py b/scripts/cache_default_models.py deleted file mode 100644 index d5bd1c35..00000000 --- a/scripts/cache_default_models.py +++ /dev/null @@ -1,35 +0,0 @@ -"""A script to download default models from huggingface. - -Downloading these model files in the build means we do not need to download them each time the app -is run. -""" - -import typer -from pvnet_summation.models.base_model import BaseModel as SummationBaseModel - -from pvnet.app import ( - default_model_name, - default_model_version, - default_summation_model_name, - default_summation_model_version, -) -from pvnet.models.base_model import BaseModel as PVNetBaseModel - - -def main(): - """Download model from Huggingface and save it to cache.""" - # Model will be downloaded and saved to cache on disk - PVNetBaseModel.from_pretrained( - default_model_name, - revision=default_model_version, - ) - - # Model will be downloaded and saved to cache on disk - SummationBaseModel.from_pretrained( - default_summation_model_name, - revision=default_summation_model_version, - ) - - -if __name__ == "__main__": - typer.run(main)