lenskit.logging.progress.Progress#

class lenskit.logging.progress.Progress(*args, uuid=None, total=None, **kwargs)#

Base class for progress reporting. The default implementations do nothing.

Parameters:
uuid: uuid.UUID#
total: int | float | None#
classmethod handle_message(update)#
Parameters:

update (lenskit.logging.multiprocess._protocol.ProgressMessage)

update(advance=1, completed=None, total=None, **kwargs)#

Update the progress bar.

Parameters:
  • advance (int) – The amount to advance by.

  • completed (int | None) – The number completed; this overrides advance.

  • total (int | None) – A new total, to update the progress bar total.

  • kwargs (float | int | str)

finish()#

Finish and clean up this progress bar. If the progresss bar is used as a context manager, this is automatically called on context exit.

__enter__()#
__exit__(*args)#
Parameters:

args (Any)