From b5a5d7f5f2953601a75742b4526512b17a805229 Mon Sep 17 00:00:00 2001 From: darothen Date: Sat, 25 Nov 2023 12:22:54 -0700 Subject: [PATCH] Sync up tweaks/changes --- README.md | 2 +- ai-models-modal/main.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5537727..c9af1d9 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ the libraries, model weights, and services upon which it is built. ## Getting Started To use this demo, you'll need accounts set up on [Google Cloud](https://cloud.google.com), -[Modal](https://www.modal.com), and the Copernicus Data Store](). +[Modal](https://www.modal.com), and the [Copernicus Data Store](). Don't worry - even though you do need to supply them ith credit card information, this demo should cost virtually nothing to run; we'll use very limited storage on Google Cloud Storage for forecast model outputs that we generate (a few cents per month if you diff --git a/ai-models-modal/main.py b/ai-models-modal/main.py index 8a4fb68..de1f4a3 100644 --- a/ai-models-modal/main.py +++ b/ai-models-modal/main.py @@ -109,6 +109,8 @@ def __init__( assets=config.AI_MODEL_ASSETS_DIR, date=int(self.init_datetime.strftime("%Y%m%d")), time=self.init_datetime.hour, + # TODO: allow user to specify desired forecast lead time, with limited + # validation (e.g. < 10 days) lead_time=12, path=str(self.out_pth), metadata={}, # Read by the output data handler @@ -140,7 +142,9 @@ def generate_forecast( ai_model = AIModel(model_name, init_datetime) logger.info("Generating forecast...") - # ai_model.run_model.remote() + ai_model.run_model.remote() + # TODO: Modal re-runs the __init__ method after this call for some reason, look into + # why that's the case and if we can avoid it. logger.info("Done!") # Double check that we successfully produced a model output file.