Skip to content

Commit

Permalink
Sync up tweaks/changes
Browse files Browse the repository at this point in the history
  • Loading branch information
darothen committed Nov 25, 2023
1 parent 1cd93d5 commit b5a5d7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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](<https://cds.climate.copernicus.eu/>).
[Modal](https://www.modal.com), and the [Copernicus Data Store](<https://cds.climate.copernicus.eu/>).
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
Expand Down
6 changes: 5 additions & 1 deletion ai-models-modal/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b5a5d7f

Please sign in to comment.