From a3b5b00542ec6f256312fd35090dd1f1afde1643 Mon Sep 17 00:00:00 2001 From: James Fulton Date: Fri, 20 Oct 2023 10:49:52 +0000 Subject: [PATCH 1/2] script moved to pvnet_app --- scripts/cache_default_models.py | 35 --------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 scripts/cache_default_models.py 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) From 1b8488e05c648bcf516fa9522dbd281efb534709 Mon Sep 17 00:00:00 2001 From: James Fulton Date: Fri, 20 Oct 2023 11:17:55 +0000 Subject: [PATCH 2/2] add req --- requirements.txt | 1 + 1 file changed, 1 insertion(+) 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