From 1d35a9a1ca7e86a4577a096553a8c804c6dc28db Mon Sep 17 00:00:00 2001 From: SongshGeo Date: Wed, 7 Jan 2026 00:13:58 +0100 Subject: [PATCH 1/2] fix(logging): :loud_sound: Enhance experiment logging with additional info message This commit adds an info log message in the `Experiment` class to indicate the number of repeats and parallels when running an experiment. Additionally, it updates the logging message in the `fire_spread` example to reflect when the experiment has finished, improving the clarity of the logging output during execution. --- abses/core/experiment.py | 3 +++ docs/api/analysis.md | 1 + examples/fire_spread/model.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/abses/core/experiment.py b/abses/core/experiment.py index 1e2a894a..7881ba6c 100644 --- a/abses/core/experiment.py +++ b/abses/core/experiment.py @@ -593,6 +593,9 @@ def batch_run( overrides: Optional[Dict[str, str | Iterable[Number]]] = None, ) -> None: """Run the experiment multiple times.""" + self.logger.info( + f"Running experiment with {repeats} repeats and {parallels} parallels." + ) cfg = deepcopy(self._cfg) if not overrides: diff --git a/docs/api/analysis.md b/docs/api/analysis.md index 1e74c51f..cfa9c12a 100644 --- a/docs/api/analysis.md +++ b/docs/api/analysis.md @@ -9,3 +9,4 @@ date: 2024-12-20 :::abses.utils.analysis.ExpAnalyzer + diff --git a/examples/fire_spread/model.py b/examples/fire_spread/model.py index 0e4d1a6a..9cd72976 100644 --- a/examples/fire_spread/model.py +++ b/examples/fire_spread/model.py @@ -179,7 +179,7 @@ def main(cfg: Optional[DictConfig] = None) -> None: """ exp = Experiment(Forest, cfg=cfg) exp.batch_run() - exp.logger.info(f"Experiment {exp.name} started") + exp.logger.info(f"Experiment {exp.name} finished!") if __name__ == "__main__": From 892f098a7dfcfc2b215d4a7b6fed6cc5a40b65f0 Mon Sep 17 00:00:00 2001 From: SongshGeo Date: Wed, 7 Jan 2026 08:35:32 +0100 Subject: [PATCH 2/2] fix(logging): :memo: Clarify logging configuration in absespy.yaml This commit updates the comments in the `absespy.yaml` file to clarify that the 'file' handler is not defined, as ABSESpy configures its own file logging through the `log.run.file` settings. This change enhances the understanding of the logging setup for users and developers. --- abses/conf/absespy.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/abses/conf/absespy.yaml b/abses/conf/absespy.yaml index 470da720..456226be 100644 --- a/abses/conf/absespy.yaml +++ b/abses/conf/absespy.yaml @@ -24,9 +24,8 @@ hydra: level: WARNING formatter: simple stream: ext://sys.stderr - # Disable Hydra's default file handler - # ABSESpy configures root logger to write user module logs to model log files - file: null + # Note: We don't define a 'file' handler here. + # ABSESpy configures its own file logging via log.run.file settings. root: level: INFO handlers: [console]