Skip to content

Set verbose logging explicitly in the example run script - #1229

Merged
jdebacker merged 1 commit into
PSLmodels:masterfrom
arihantlodha-cmd:example-explicit-logging
Sep 26, 2026
Merged

jdebacker merged 1 commit into
PSLmodels:masterfrom
arihantlodha-cmd:example-explicit-logging

Conversation

@arihantlodha-cmd

Copy link
Copy Markdown
Contributor

What this does

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 of run_ogcore_example.py.

It also adds a comment about a caveat worth knowing: when the model is run with a distributed Client (num_workers > 1, as the example does), the per-iteration steady-state root-finding distances and transition-path distance measures are logged on the Dask worker processes and do not stream back to the console running the example. Running serially shows the full per-iteration output.

Scope

Routing the Dask worker logs back to the client console is a larger change and left for a separate issue; this PR just makes the example's verbosity explicit and documents the parallel-run caveat. See the triage note on #1108 for the full context (the ogcore logger is already auto-set to INFO on import in current config.py).

Addresses PSLmodels#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.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.17%. Comparing base (9baa4b2) to head (30ccecd).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1229   +/-   ##
=======================================
  Coverage   75.17%   75.17%           
=======================================
  Files          24       24           
  Lines        6031     6031           
=======================================
  Hits         4534     4534           
  Misses       1497     1497           
Flag Coverage Δ
unittests 75.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jdebacker
jdebacker merged commit 3a4bf44 into PSLmodels:master Sep 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants