Rosetta  2020.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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__
 
def increment
 
def __iadd__
 
def logging_iter
 
def count
 
def iterate
 
def enumerate
 

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

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

def pyrosetta.distributed.utility.log.ProgressLogger.__iadd__ (   self,
  other 
)
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().

def pyrosetta.distributed.utility.log.ProgressLogger.enumerate (   self,
  sequence 
)
Return a generator that enumerates 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 numeric::geometry::hashing::Counter.count, numeric::model_quality::RmsData.count(), pyrosetta.distributed.utility.log.ProgressLogger.count(), ObjexxFCL.len(), pyrosetta.distributed.utility.log.ProgressLogger.total, and basic::options::OptionKeys::in::file.zip.

def pyrosetta.distributed.utility.log.ProgressLogger.increment (   self,
  by = 1 
)
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 pyrosetta.distributed.utility.log.ProgressLogger.increment(), ObjexxFCL.len(), and pyrosetta.distributed.utility.log.ProgressLogger.total.

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

Member Data Documentation

pyrosetta.distributed.utility.log.ProgressLogger.fraction
pyrosetta.distributed.utility.log.ProgressLogger.iteration
pyrosetta.distributed.utility.log.ProgressLogger.iterations
pyrosetta.distributed.utility.log.ProgressLogger.last_iteration
pyrosetta.distributed.utility.log.ProgressLogger.last_time
pyrosetta.distributed.utility.log.ProgressLogger.level
pyrosetta.distributed.utility.log.ProgressLogger.logger
pyrosetta.distributed.utility.log.ProgressLogger.prefix
pyrosetta.distributed.utility.log.ProgressLogger.seconds
pyrosetta.distributed.utility.log.ProgressLogger.start_time
pyrosetta.distributed.utility.log.ProgressLogger.total

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