vibeqc.resolve_progress

vibeqc.resolve_progress(progress, *, verbose=None, use_logging=False)[source]

Normalize the progress= argument every SCF entry point takes.

  • True -> a fresh ProgressLogger writing to stdout at the requested verbose level (default 4).

  • False or None -> a shared, silent no-op logger.

  • ProgressLogger -> returned unchanged (verbose / use_logging kwargs are ignored – the caller-supplied logger is fully under the caller’s control).

This indirection lets every SCF driver accept any of the four forms via a one-line normalisation at the top of the function, and threads the verbose=N knob through without each entry point having to construct its own logger by hand.

A fifth form is a transparent wrapper around a ProgressLogger – e.g. the live-checkpointing proxy from vibeqc.output.checkpoint.wrap_progress_for_checkpoints(), which forwards every method to a real logger but also fires a QVF snapshot on each iteration. Such a wrapper is not a ProgressLogger instance, but it is a caller-supplied sink: any object exposing a callable iteration is returned unchanged so the wrapper survives each driver’s resolve_progress normalisation (otherwise the per-iteration checkpoint hook would be silently stripped before the SCF loop ran).

Parameters:
Return type:

ProgressLogger