Skip to content

Commit 5690a5c

Browse files
committed
Fix warning catch to allow for python <=3.10
1 parent e2d80d6 commit 5690a5c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ai_models_gencast/model.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,9 @@ def run(self):
296296
stepper = self.stepper(self.hour_steps)
297297

298298
with stepper:
299-
with warnings.catch_warnings(action="ignore", category=FutureWarning):
299+
with warnings.catch_warnings(action="ignore"):
300300
# Remove GraphCast/GenCast xarray future warnings
301+
warnings.filterwarnings("ignore", category=FutureWarning)
301302
for i, chunk in enumerate(
302303
rollout.chunked_prediction_generator_multiple_runs(
303304
self.model,

0 commit comments

Comments
 (0)