File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ requires = [
19
19
name = "ai-models-gencast"
20
20
21
21
description = "An ai-models plugin to run Deepmind's gencast model"
22
+ readme = "README.md"
22
23
keywords = [
23
24
"ai" ,
24
25
"tools" ,
Original file line number Diff line number Diff line change 10
10
import functools
11
11
import gc
12
12
import logging
13
+ import math
13
14
import os
14
15
import warnings
15
16
from contextlib import nullcontext
@@ -336,8 +337,11 @@ def get_path(filename):
336
337
pmap_devices = jax .local_devices (),
337
338
)
338
339
):
339
- time_step = (i % (self .lead_time // self .hour_steps )) + 1
340
- ensemble_chunk = ((i // (self .lead_time // self .hour_steps ))) * len (jax .local_devices ())
340
+
341
+ num_steps = math .ceil (self .lead_time / self .hour_steps )
342
+
343
+ time_step = (i % num_steps ) + 1
344
+ ensemble_chunk = ((i // num_steps )) * len (jax .local_devices ())
341
345
member_number_subset = self .member_number [
342
346
ensemble_chunk : ensemble_chunk + len (jax .local_devices ())
343
347
]
You can’t perform that action at this time.
0 commit comments