From 30ccecd3f770e1655e123aba62d387406174c286 Mon Sep 17 00:00:00 2001 From: arihantlodha-cmd Date: Fri, 25 Sep 2026 20:39:49 +0900 Subject: [PATCH] Set verbose logging explicitly in the example run script Addresses #1108. The example script relied on the import-time default in ogcore.config for its log level, so it was not self-documenting about the diagnostics it emits. This calls set_logging_level(verbose=True) explicitly at the top, and adds a comment noting that with a distributed Client (num_workers > 1) the per-iteration steady-state and transition distances are logged on the Dask worker processes and do not stream to this console, so a serial run is needed to see the full per-iteration output. Routing Dask worker logs back to the client console is a larger change and left for a separate issue. --- examples/run_ogcore_example.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/run_ogcore_example.py b/examples/run_ogcore_example.py index 58cac6a52..cd768fd15 100644 --- a/examples/run_ogcore_example.py +++ b/examples/run_ogcore_example.py @@ -14,8 +14,16 @@ from ogcore.parameters import Specifications from ogcore.constants import REFORM_DIR, BASELINE_DIR from ogcore.utils import safe_read_pickle +from ogcore.config import set_logging_level import matplotlib.pyplot as plt +# Show the steady-state root-finding distances and the transition-path +# distance measures while the model solves. Note that when the model is run +# with a distributed Client (num_workers > 1, as below), the per-iteration +# logs are emitted on the Dask worker processes and do not stream back to +# this console; run serially to see the full per-iteration output. +set_logging_level(verbose=True) + # Use a custom matplotlib style file for plots plt.style.use("ogcore.OGcorePlots")