Rosetta
Public Member Functions | Public Attributes | List of all members
pyrosetta.distributed.utility.log.ProgressLogger Class Reference
Inheritance diagram for pyrosetta.distributed.utility.log.ProgressLogger:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, logger, prefix, level=logging.INFO, seconds=None, iterations=None, fraction=None, total=None)
 
def increment (self, by=1)
 
def __iadd__ (self, other)
 
def logging_iter (self, iterable)
 
def count (self, start=0, step=1)
 
def iterate (self, sequence)
 
def enumerate (self, sequence)
 

Public Attributes

 logger
 
 level
 
 prefix
 
 seconds
 
 iterations
 
 fraction
 
 total
 
 iteration
 
 last_iteration
 
 start_time
 
 last_time
 

Detailed Description

Issues incremental log messages for a set of tasks.

Constructor & Destructor Documentation

◆ __init__()

def pyrosetta.distributed.utility.log.ProgressLogger.__init__ (   self,
  logger,
  prefix,
  level = logging.INFO,
  seconds = None,
  iterations = None,
  fraction = None,
  total = None 
)
Initialize progress logger.

logger - target logger
level - target log level
prefix - string prefix in log message
seconds - emit log message after given seconds seconds
iterations - emit log message after given interations
fraction - emit log message at given fraction of total run, valid only if total provided
total - total number of tasks

Referenced by pyrosetta.distributed.tasks.taskbase.TaskBase.__setstate__().

Member Function Documentation

◆ __iadd__()

def pyrosetta.distributed.utility.log.ProgressLogger.__iadd__ (   self,
  other 
)

◆ count()

def pyrosetta.distributed.utility.log.ProgressLogger.count (   self,
  start = 0,
  step = 1 
)
Generator returning evenly spaced values starting with n, incrementing on iteration.

Referenced by pyrosetta.distributed.utility.log.ProgressLogger.enumerate().

◆ enumerate()

def pyrosetta.distributed.utility.log.ProgressLogger.enumerate (   self,
  sequence 
)

◆ increment()

def pyrosetta.distributed.utility.log.ProgressLogger.increment (   self,
  by = 1 
)

◆ iterate()

def pyrosetta.distributed.utility.log.ProgressLogger.iterate (   self,
  sequence 
)
Return a generator that wraps an iterable, performing increment calls on each iteration.

If sequence is sized and self.total is None, self.total will be updated to length of sequence.

References HBondedPairIterator.increment(), pyrosetta.distributed.utility.log.ProgressLogger.increment(), ObjexxFCL.len(), ScoreBreakdown.total, and pyrosetta.distributed.utility.log.ProgressLogger.total.

◆ logging_iter()

def pyrosetta.distributed.utility.log.ProgressLogger.logging_iter (   self,
  iterable 
)
Wrap iterator in logging increment.

Member Data Documentation

◆ fraction

pyrosetta.distributed.utility.log.ProgressLogger.fraction

◆ iteration

pyrosetta.distributed.utility.log.ProgressLogger.iteration

◆ iterations

pyrosetta.distributed.utility.log.ProgressLogger.iterations

◆ last_iteration

pyrosetta.distributed.utility.log.ProgressLogger.last_iteration

◆ last_time

pyrosetta.distributed.utility.log.ProgressLogger.last_time

◆ level

pyrosetta.distributed.utility.log.ProgressLogger.level

◆ logger

pyrosetta.distributed.utility.log.ProgressLogger.logger

◆ prefix

pyrosetta.distributed.utility.log.ProgressLogger.prefix

◆ seconds

pyrosetta.distributed.utility.log.ProgressLogger.seconds

◆ start_time

pyrosetta.distributed.utility.log.ProgressLogger.start_time

Referenced by schema.Job.duration().

◆ total

pyrosetta.distributed.utility.log.ProgressLogger.total

The documentation for this class was generated from the following file: