starling.inference.constraints.ConstraintLogger

class ConstraintLogger[source]

Bases: object

Methods

__init__

close

Close the progress bar and clean up.

setup

Set up the progress bar for constraint logging.

update

Update logger with new constraint metrics.

__init__(n_steps, verbose=True, update_freq=1)[source]
setup()[source]

Set up the progress bar for constraint logging.

Initializes the tqdm progress bar if verbose mode is enabled and resets the step counter.

update(timestep, constraint_name, metrics)[source]

Update logger with new constraint metrics.

Parameters:
  • timestep (int) – Current diffusion timestep.

  • constraint_name (str) – Name of the constraint being logged.

  • metrics (dict) – Dictionary containing constraint metrics (loss, scale, etc.).

close()[source]

Close the progress bar and clean up.

Closes the tqdm progress bar if it exists in verbose mode.