From 244403ad79bbaca62948476768f3317d208a176e Mon Sep 17 00:00:00 2001 From: Harrison Cook Date: Wed, 25 Sep 2024 16:18:04 +0000 Subject: [PATCH] Add verbosity to runner --- src/anemoi/inference/runner.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/anemoi/inference/runner.py b/src/anemoi/inference/runner.py index 1890592..84652d9 100644 --- a/src/anemoi/inference/runner.py +++ b/src/anemoi/inference/runner.py @@ -57,8 +57,11 @@ def ignore(*args, **kwargs): class Runner: """_summary_""" - def __init__(self, checkpoint): + _verbose = True + + def __init__(self, checkpoint, verbose: bool = True): self.checkpoint = Checkpoint(checkpoint) + self._verbose = verbose def run( self, @@ -98,7 +101,8 @@ def run( _description_ """ - self.checkpoint.summary() + if self._verbose: + self.checkpoint.summary() if autocast is None: autocast = self.checkpoint.precision