Skip to content

Commit

Permalink
Error raise on 0% of the forecast work (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanbhosale authored Feb 25, 2024
1 parent c7e3ffd commit 7b78b9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions forecast-inference/forecast_inference/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ def main(
)
_log.info(f"Errored on {num_errors} PV sites ({num_errors / len(pv_ids) * 100:.1f} %)")

# Raise an error if all forecasts fail
if num_successes == 0:
raise RuntimeError("All forecasts failed")


if __name__ == "__main__":
main()

0 comments on commit 7b78b9c

Please sign in to comment.