Skip to content

Commit

Permalink
skip computation of next forcings if current step is the last one (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
frazane authored Dec 5, 2024
1 parent 62fff47 commit b1d2560
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/anemoi/inference/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ def forecast(self, lead_time, input_tensor_numpy, input_state):

yield result

# No need to prepare next input tensor if we are at the last step
if s == steps - 1:
continue

# Update tensor for next iteration

check[:] = reset
Expand Down

0 comments on commit b1d2560

Please sign in to comment.