MCPcopy Index your code
hub / github.com/pytorch/pytorch / __init__

Method __init__

caffe2/python/dataio.py:459–473  ·  view source on GitHub ↗

Class initializer. Args: reader: The underlying reader object doing the actual read. duration: Number of seconds to read. If un-specified, None, or <= 0, the class reverts to a normal reader except that it also produces a data_finished

(self, reader, duration=0)

Source from the content-addressed store, hash-verified

457 the data steam.
458 """
459 def __init__(self, reader, duration=0):
460 """Class initializer.
461
462 Args:
463 reader: The underlying reader object doing the actual read.
464 duration: Number of seconds to read. If un-specified, None, or <= 0,
465 the class reverts to a normal reader except that it also
466 produces a data_finished blob as a side effect to indicate
467 whether the input stream is exhausted.
468 """
469 super().__init__(reader)
470
471 self.timer = None
472 self.duration = duration
473 self.duration_ns_blob = None
474
475 def setup_limiter(self, global_init_net, global_finish_net):
476 if self.duration is not None and self.duration > 0:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected