/usr/local/lib64/python3.6/site-packages/caffe2/python/__pycache__
NameSizeModeActions
allcompare_test.cpython-36.pyc27100644editdlrm
attention.cpython-36.pyc49380644editdlrm
benchmark_generator.cpython-36.pyc39100644editdlrm
binarysize.cpython-36.pyc48530644editdlrm
brew.cpython-36.pyc38490644editdlrm
brew_test.cpython-36.pyc104520644editdlrm
build.cpython-36.pyc3400644editdlrm
cached_reader.cpython-36.pyc29540644editdlrm
caffe_translator.cpython-36.pyc241650644editdlrm
caffe_translator_test.cpython-36.pyc29290644editdlrm
checkpoint.cpython-36.pyc279730644editdlrm
checkpoint_test.cpython-36.pyc94620644editdlrm
cnn.cpython-36.pyc84350644editdlrm
context.cpython-36.pyc40080644editdlrm
context_test.cpython-36.pyc26650644editdlrm
control.cpython-36.pyc144660644editdlrm
control_ops_grad.cpython-36.pyc163650644editdlrm
control_ops_grad_test.cpython-36.pyc15020644editdlrm
control_ops_util.cpython-36.pyc83320644editdlrm
control_test.cpython-36.pyc118700644editdlrm
convert.cpython-36.pyc1480644editdlrm
convert_test.cpython-36.pyc5680644editdlrm
convnet_benchmarks.cpython-36.pyc129450644editdlrm
convnet_benchmarks_test.cpython-36.pyc10900644editdlrm
core.cpython-36.pyc944280644editdlrm
core_gradients_test.cpython-36.pyc248250644editdlrm
core_test.cpython-36.pyc339420644editdlrm
crf.cpython-36.pyc76220644editdlrm
crf_predict.cpython-36.pyc10440644editdlrm
crf_viterbi_test.cpython-36.pyc16770644editdlrm
dataio.cpython-36.pyc239780644editdlrm
dataio_test.cpython-36.pyc132670644editdlrm
dataset.cpython-36.pyc128790644editdlrm
data_parallel_model.cpython-36.pyc514160644editdlrm
data_parallel_model_test.cpython-36.pyc389230644editdlrm
data_workers.cpython-36.pyc131420644editdlrm
data_workers_test.cpython-36.pyc45220644editdlrm
db_file_reader.cpython-36.pyc53610644editdlrm
db_test.cpython-36.pyc13280644editdlrm
device_checker.cpython-36.pyc40140644editdlrm
dyndep.cpython-36.pyc15680644editdlrm
embedding_generation_benchmark.cpython-36.pyc42030644editdlrm
experiment_util.cpython-36.pyc32330644editdlrm
extension_loader.cpython-36.pyc5430644editdlrm
fakefp16_transform_lib.cpython-36.pyc5460644editdlrm
filler_test.cpython-36.pyc9250644editdlrm
functional.cpython-36.pyc35310644editdlrm
functional_test.cpython-36.pyc41320644editdlrm
fused_8bit_rowwise_conversion_ops_test.cpython-36.pyc36310644editdlrm
gradient_checker.cpython-36.pyc106220644editdlrm
gradient_check_test.cpython-36.pyc167880644editdlrm
gru_cell.cpython-36.pyc25960644editdlrm
hip_test_util.cpython-36.pyc6690644editdlrm
hsm_util.cpython-36.pyc18230644editdlrm
hypothesis_test.cpython-36.pyc843120644editdlrm
hypothesis_test_util.cpython-36.pyc200390644editdlrm
ideep_test_util.cpython-36.pyc10810644editdlrm
layers_test.cpython-36.pyc573720644editdlrm
layer_model_helper.cpython-36.pyc216410644editdlrm
layer_model_instantiator.cpython-36.pyc36650644editdlrm
layer_parameter_sharing_test.cpython-36.pyc56260644editdlrm
layer_test_util.cpython-36.pyc52730644editdlrm
lazy.cpython-36.pyc4240644editdlrm
lazy_dyndep.cpython-36.pyc24750644editdlrm
lazy_dyndep_test.cpython-36.pyc48070644editdlrm
lengths_reducer_fused_8bit_rowwise_ops_test.cpython-36.pyc43920644editdlrm
lengths_reducer_rowwise_8bit_ops_test.cpython-36.pyc36840644editdlrm
lstm_benchmark.cpython-36.pyc72820644editdlrm
memonger.cpython-36.pyc321700644editdlrm
memonger_test.cpython-36.pyc231000644editdlrm
mkl_test_util.cpython-36.pyc11910644editdlrm
model_device_test.cpython-36.pyc33760644editdlrm
model_helper.cpython-36.pyc186180644editdlrm
model_helper_test.cpython-36.pyc19910644editdlrm
modifier_context.cpython-36.pyc26500644editdlrm
muji.cpython-36.pyc55660644editdlrm
muji_test.cpython-36.pyc35670644editdlrm
net_builder.cpython-36.pyc267860644editdlrm
net_builder_test.cpython-36.pyc92550644editdlrm
net_drawer.cpython-36.pyc100560644editdlrm
net_printer.cpython-36.pyc143670644editdlrm
net_printer_test.cpython-36.pyc33230644editdlrm
nomnigraph.cpython-36.pyc51250644editdlrm
nomnigraph_test.cpython-36.pyc145910644editdlrm
nomnigraph_transformations.cpython-36.pyc24310644editdlrm
nomnigraph_transformations_test.cpython-36.pyc40730644editdlrm
normalizer.cpython-36.pyc19410644editdlrm
normalizer_context.cpython-36.pyc15530644editdlrm
normalizer_test.cpython-36.pyc8700644editdlrm
numa_benchmark.cpython-36.pyc18860644editdlrm
numa_test.cpython-36.pyc16260644editdlrm
observer_test.cpython-36.pyc41810644editdlrm
operator_fp_exceptions_test.cpython-36.pyc13050644editdlrm
optimizer.cpython-36.pyc456060644editdlrm
optimizer_context.cpython-36.pyc20080644editdlrm
optimizer_test.cpython-36.pyc247470644editdlrm
optimizer_test_util.cpython-36.pyc68080644editdlrm
parallelize_bmuf_distributed_test.cpython-36.pyc69900644editdlrm
parallel_workers.cpython-36.pyc91480644editdlrm
parallel_workers_test.cpython-36.pyc38240644editdlrm
pipeline.cpython-36.pyc129400644editdlrm
pipeline_test.cpython-36.pyc27150644editdlrm
predictor_constants.cpython-36.pyc3040644editdlrm
python_op_test.cpython-36.pyc105020644editdlrm
queue_util.cpython-36.pyc50550644editdlrm
record_queue.cpython-36.pyc42250644editdlrm
recurrent.cpython-36.pyc98930644editdlrm
regularizer.cpython-36.pyc186040644editdlrm
regularizer_context.cpython-36.pyc15620644editdlrm
regularizer_test.cpython-36.pyc88250644editdlrm
rnn_cell.cpython-36.pyc447850644editdlrm
schema.cpython-36.pyc417630644editdlrm
schema_test.cpython-36.pyc137870644editdlrm
scope.cpython-36.pyc26000644editdlrm
scope_test.cpython-36.pyc40680644editdlrm
session.cpython-36.pyc73460644editdlrm
session_test.cpython-36.pyc23530644editdlrm
sparse_to_dense_mask_test.cpython-36.pyc52980644editdlrm
sparse_to_dense_test.cpython-36.pyc30030644editdlrm
task.cpython-36.pyc222070644editdlrm
task_test.cpython-36.pyc11780644editdlrm
test_util.cpython-36.pyc37290644editdlrm
text_file_reader.cpython-36.pyc22390644editdlrm
timeout_guard.cpython-36.pyc31060644editdlrm
toy_regression_test.cpython-36.pyc23600644editdlrm
transformations.cpython-36.pyc18330644editdlrm
transformations_test.cpython-36.pyc96080644editdlrm
tt_core.cpython-36.pyc64680644editdlrm
tt_core_test.cpython-36.pyc18240644editdlrm
utils.cpython-36.pyc122450644editdlrm
utils_test.cpython-36.pyc14160644editdlrm
visualize.cpython-36.pyc60270644editdlrm
workspace.cpython-36.pyc226900644editdlrm
workspace_test.cpython-36.pyc290550644editdlrm
_import_c_extension.cpython-36.pyc15240644editdlrm
__init__.cpython-36.pyc26070644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/caffe2/python/__pycache__/checkpoint.cpython-36.pyc (27973B)
3 Ege}@sddlZddlZddlmZmZddlmZddlmZm Z m Z m Z m Z m Z ejeZGdddejZddZdd d ZGd d d eZGd ddeZGdddeZGdddeZddZdS)N)corecontext)ops) final_outputNodeTask TaskGroup TaskOutput WorkspaceTypecsNeZdZdZdddZddZddZfd d Zfd d Zd dZ Z S)Jobad A Job defines three TaskGroups: the `init_group`, the `epoch_group` and the `exit_group` which will be run by a JobRunner. The `init_group` will be run only once at startup. Its role is to initialize globally persistent blobs such as model weights, accumulators and data file lists. The `epoch_group` will be run in a loop after init_group. The loop will exit when any of the stop signals added with `add_stop_condition` is True at the end of an epoch. The download_group will be run only once, after all the executions of epoch_group finish. Its role is to collect the distribute scattered parameters back after training. The `exit_group` will be run only once at the very end of the job, the role of this group is to save the results of training in the end of the job. Jobs are context-driven, so that Tasks can be added to the active Job without having to explicitly pass the job object around. Example of usage: def build_reader(partitions): with Job.current().init_group: reader = HiveReader(init_reader, ..., partitions) Task(step=init_reader) with Job.current().epoch_group: limited_reader = ReaderWithLimit(reader, num_iter=10000) data_queue = pipe(limited_reader, num_threads=8) Job.current().add_stop_condition(limited_reader.data_finished()) return data_queue def build_hogwild_trainer(reader, model): with Job.current().init_group: Task(step=model.param_init_net) with Job.current().epoch_group: pipe(reader, processor=model, num_threads=8) with Job.current().exit_group: Task(step=model.save_model_net) with Job() as job: reader = build_reader(partitions) model = build_model(params) build_hogwild_trainer(reader, model) NcCsJ|pttjd|_|pt|_|p&t|_|p2t|_|prZGetAllBlobNamesr5r9r8r:loggerinfoLoadrr?)rnodesretrieve_from_epochr4 path_typetaskZ full_db_namerDrrrinits*   zCheckpointManager.initcCs|js t|jjjS)N)r?r!fetchtolist)rrrr blob_lists zCheckpointManager.blob_listcCslt|dX}tjtjg|jd}WdQRX|tjtj|}WdQRXt||_WdQRX|S)an Build a Task that will measure the time span of checkpoint operations, once operation is done, time can be read from _current_checkpoint_duration. Args: cp_op_name: A string name of the checkpoint operation. add_op: A functor to add the checkpoint operation. Returns: A task with timer. )name)Z counter_nameN) rrZ task_initZ TimerBeginr9Z task_exitZTimerGetAndEndrrC)rZ cp_op_nameadd_oprQtimerZtime_span_blobrrr _timed_tasks   zCheckpointManager._timed_taskcCs8|jr"|jr"|jjd||j<ntjdj|jdS)z Add one checkpoint stats into the stats. Args: stats: A dict of checkpoint stats that will be reported. rz&Failed to collect checkpoint stats: {}N)rBrCrSrKrLformat)rstatsrrrcollect_checkpoint_statss  z*CheckpointManager.collect_checkpoint_statscsHt|jj|_|pjtjdjfdd}jd|S)z Build a Task that will be run by JobRunner when the job is to be resumed from a given epoch. This task will run a Load op that will load and deserialize all relevant blobs from a persistent storage. zLoading checkpoints from = %scs tjgjjddddS)NT)rGrDrHrI)rrMrUrBr)rDrrrrWsz&CheckpointManager.load..add_opcheckpoint_load)r5r9r8rBr:rKrLrY)rr.r4rPrWr)rDrrloads   zCheckpointManager.loadcs<t|jj_tjdjfdd}jd|S)a Builds a Task that loads only the necessary blobs from a checkpoint of the given epoch. The necessary blobs are given in the blob_names argument. Args: blob_names: A list of strings. Each string is the name of a blob. epoch: The checkpoint epoch to load from. Returns: A Task which loads the specified blobs from the checkpoint of the given epoch. z Load from %scstjgjjddddS)NT)rGrDrHZallow_incomplete)rrMrBr:r)r7rrrrW9sz.add_opcheckpoint_partial_load)r5r9r8rBrKrLrY)rr7r.rWr)r7rrload_blobs_from_checkpoint's z,CheckpointManager.load_blobs_from_checkpointcCshtjdt||j|jt>}tjd}tjg|gt||j|j|j dd|j |WdQRX|S)NzCheck existence of %sFT)r5rDrH) rKrLr5r9r8rrZConstZDBExistsr:Z add_output)rr.rQ existencerrrcheck_db_existsDs z!CheckpointManager.check_db_existscCs&i}|j||jr"|jj||dS)z Report checkpoint operation stats for current node. Args: action_name: A string of the name of checkpoint operation. N)r\r;report)r action_name all_statsrrrreport_checkpoint_statsRs z)CheckpointManager.report_checkpoint_statscs:t|jj_tjdjfdd}jd|S)z Build a Task that is run once after `init_group` and after each epoch is run. This will execute a Save ops to serialize and persist blobs present in the global workspace. z Saving to %scs tjjgjjdddS)NT)rGrDrH)rZSaverUrBr:r)rrrrWgs z&CheckpointManager.save..add_opcheckpoint_save)r5r9r8rBrKrLrY)rr.rWr)rrsave^s zCheckpointManager.savecCs|jdk r|jj|ddS)z Write metadata for checkpoint Args: epoch: An integer. The epoch-id for which checkpoint metadata is written N)r.)r;write)rr.rrrwrite_checkpoint_metadataps z+CheckpointManager.write_checkpoint_metadatacCs |}|jdk r|jj|d}|S)a^ Identify the epoch-id from which Job must resume Args: user_epoch: An integer. Optional parameter for user to explicitly identify the epoch-id to load checkpoint from Returns: epoch: the epoch-id to load checkpoints from or None if no checkpoints were written N) user_epoch)r; last_epoch)rrkrlrrrget_resume_from_epoch_id{s  z*CheckpointManager.get_resume_from_epoch_idcCsD|r ||_|r||_|jr@|jj|j|jt|jg|j|jddS)aRSet parameters associated with CP manager Args: nodes: An array of nodes where this checkpoint manager is running. path_prefix: Used to construct db name or path where checkpoint files are stored. path_type: Indicate the type of path where checkpoint files are stored. )r3rD node_namesr4rPN)r@rAr; set_paramsr8r:r,r9)rrNr4rPrrrros  zCheckpointManager.set_paramscCs|jdk r|jj|SdSdS)aEReturns True if Checkpoint data is accessible Args: epoch: An integer. The epoch of the checkpoint. If None, it implies we need to check if checkpoint directory is accessible Returns: is_cp_accessible: A boolean. Returns True if Checkpoint data is accessible NT)r; cp_accessible)rr.rrrrps  zCheckpointManager.cp_accessible)N)NNNN)NN)N)NN)N)r&r'r(r)r=rrRrUrYr\r^r`rbrfrhrjrmrorprrrrr6s&   !    r6c@s|eZdZdZdddZddZdddZdd d Zd d Zd dZ ddZ ddZ ddZ dddZ dddZd ddZdS)!MultiNodeCheckpointManagera? Coordinates checkpointing and checkpointing across multiple nodes. Each of `init`, `load` and `save` will build TaskGroups which will trigger checkpointing on each of the nodes involved in a distributed job. Args: db_prefix: The prefix used to construct full db name. Since `absolute_path` is set to True, this will be used as db_name in SaveOp. db_type: Type of database to use for storing checkpoint. metadata_handler: An optional object capable of reading/writing checkpoint info in storage of choice. NcCs(d|_||_||_||_d|_d|_dS)N)_node_managersr8r:r;r@rA)rr3rDrErrrrs z#MultiNodeCheckpointManager.__init__cOsd|jdk stdttj>}x6|jD],\}}t|||f||WdQRXq&W|SQRXdS)Nzinit must be called first.)rrr!rr r r)rfuncrkwZ task_groupnodemanagerrrr _task_groups   z&MultiNodeCheckpointManager._task_groupc Cs|jdk r,dd|jD|ks"tttjSg|_xF|D]>}t|,t|jt||j d}|jj ||fWdQRXq8W|j tj |g|||dS)NcSsg|] \}}|qSrr).0ru_rrr sz3MultiNodeCheckpointManager.init..)r3r-rD)rNrOr4rP) rrr!rr r rr6r8r,r:r"rwrR)rrNrOr4rPrurvrrrrRs"     zMultiNodeCheckpointManager.initcCs|jtj|||dS)N)r4rP)rwr6r^)rr.r4rPrrrr^s zMultiNodeCheckpointManager.loadc Cs|jdk r$dd|jD|ksrtnNg|_xF|D]>}t|,t|jt||jd}|jj||fWdQRXq0W|jdk stdxn|jD]d\}}|j|}|j ||j dj } | st j dt||j|jdS|j||} |j | qWt j d d S) a:Loads the necessary blobs from the checkpoints to the current node. Args: blob_names: A list of strings. Each string is the name of a blob. epoch: An integer. The checkpoint epoch to load from. session: A Session object to execute the Load ops. NcSsg|] \}}|qSrr)rxruryrrrrzszAMultiNodeCheckpointManager.load_blobs_locally..)r3r-rDzmust initialize node managersrzDB %s does not exist!Fz%Successfully loaded from checkpoints.T)rrr!rr6r8r,r:r"rbrunrrSrKrLr5r9r`) rrNr7r.sessionrurvryZexistence_taskraZ load_taskrrrload_blobs_locallys.        z-MultiNodeCheckpointManager.load_blobs_locallycCs4x.|jD]$\}}t||krt||j|jSqWdS)aReturns the DB name of the given node and the given epoch. The DB name is effectively the checkpoint path of the given node and the given epoch. Args: node_name: A string. The node name of interest. epoch: An integer. The epoch of the checkpoint. Returns: checkpoint_db_name: A string. The checkpoint path of the given node and the given epoch. N)rrr,r5r9r8)rr-r.rurvrrrget_ckpt_db_names z+MultiNodeCheckpointManager.get_ckpt_db_namecCsJi}x|jD]\}}|j|q Wtjdj||jrF|jj||dS)a Report the checkpoint stats for all the nodes, we need to aggregate all the node's stats together so that we know which node's checkpoint operation dominates. Args: action_name: A string of the name of checkpoint operation. zcheckpoint stats: {}N)rrr\rKdebugrZr;rc)rrdreryrvrrrrf%s z2MultiNodeCheckpointManager.report_checkpoint_statscCs|jtj|S)z Build a Task that will execute a Save ops to serialize and persist blobs present in the global workspace. )rwr6rh)rr.rrrrh5szMultiNodeCheckpointManager.savecCs|jdk r|jj|ddS)z Write metadata for checkpoint Args: epoch: An integer. The epoch-id for which checkpoint metadata is written N)r.)r;ri)rr.rrrrj<s z4MultiNodeCheckpointManager.write_checkpoint_metadatacCs |}|jdk r|jj|d}|S)a^ Identify the epoch-id from which Job must resume Args: user_epoch: An integer. Optional parameter for user to explicitly identify the epoch-id to load checkpoint from Returns: epoch: the epoch-id to load checkpoints from or None if no checkpoints were written N)rk)r;rl)rrkrlrrrrmGs  z3MultiNodeCheckpointManager.get_resume_from_epoch_idcCsNdd|D|_|r||_|r$||_|jrJ|jj|j|j|j|j|jddS)aRSet parameters associated with CP manager Args: nodes: An array of nodes where this checkpoint manager is running. path_prefix: Used to construct db name or path where checkpoint files are stored. path_type: Indicate the type of path where checkpoint files are stored. cSsg|] }t|qSr)r,)rxrurrrrz`sz9MultiNodeCheckpointManager.set_params..)r3rDrnr4rPN)Z _node_namesr@rAr;ror8r:)rrNr4rPrrrroWs z%MultiNodeCheckpointManager.set_paramscCs|jdk r|jj|SdSdS)aEReturns True if Checkpoint data is accessible Args: epoch: An integer. The epoch of the checkpoint. If None, it implies we need to check if checkpoint directory is accessible Returns: is_cp_accessible: A boolean. Returns True if Checkpoint data is accessible NT)r;rp)rr.rrrrpms  z(MultiNodeCheckpointManager.cp_accessible)N)NNN)NN)N)NN)N)r&r'r(r)rrwrRr^r}r~rfrhrjrmrorprrrrrqs    "  rqc@seZdZdZddZdS)UploadTaskGroupBuilderz%A simple class to upload checkpoints.cCs tdS)aBuilds the task group to upload checkpoints. Args: epoch: An integer. The checkpoint epoch to be uploaded. checkpoint_manager: Can be a CheckpointManager for single machine or a MultiNodeCheckpointManager for multi-machine. The manager that initializes/saves/loads checkpoints. Raises: NotImplementedError: This base class only has the interface, the implementation will be in the subclasses. N)NotImplementedError)rr.checkpoint_managerrrrbuilds zUploadTaskGroupBuilder.buildN)r&r'r(r)rrrrrr}src@s2eZdZdZd ddZddZddZd d ZdS) JobRunnera Implement the runtime logic for jobs with checkpointing at the level of epoch. Can be used to run either single-host or distributed jobs. Job runner is a callable to be called once from the master, passing a session as an argument. This call will block until the Job execution is complete. If a checkpoint_manager is passed, checkpoints will be taken after initialization and after each epoch execution. If, in addition, `resume_from_epoch` is an epoch number, the corresponding checkpoint will be loaded and job execution will continue from the given epoch. In this case, the job's init_group will not be run. Refer to checkpoint_test.py for an example. NcCs||_||_||_||_dS)a"Initializes the JobRunner. Args: job: A Job object. The job to be executed. checkpoint_manager: Can be a CheckpointManager for single machine or a MultiNodeCheckpointManager for multi-machine. The manager that initializes/saves/loads checkpoints. resume_from_epoch: An integer. The epoch to resume from. upload_task_group_builder: A subclass of the UploadTaskGroupBuilder. Creates a task group to upload checkpoints. N)resume_from_epochrjobupload_task_group_builder)rrrrrrrrrszJobRunner.__init__cCs|jrF|jj|jjd|jj|j|_|jdk rFtjdj|j|jdk}|rb|j |jj |jrtjd|j |jj |jj|jd|r|j d|n.ZStoppingzFinished trainingz"Finished uploading the checkpointsz#Finished downloading the parameterszFinished running the exit group)rrorrrmrrKrLrZr{r rRsave_checkpointsr^rfrranyrrrr)rr|Z from_scratchr.rZupload_task_grouprrrtrains\                     zJobRunner.traincCsF|jstdtjdj||jj|jj|||}|jjd|S)aPLoads the necessary blobs from the checkpoints. Checkpoints store the snapshots of the workspace in each node. Sometimes we only need to load a subset of the blobs from the checkpoints. One common scenario is to load only the model blobs from the checkpoints for evaluation purpose. Given the names of the necessary blobs, this function goes over all the checkpoints of all the nodes, but only loads the blobs specified in the blob_names to the current workspace. Args: blob_names: A list of strings. Each string is the name of a blob. epoch: An integer. The checkpoint epoch to load from. session: A Session object to execute the load ops. Raises: ValueError: When the checkpoint manager is invalid. zCheckpoint manager is Nonez#Loading checkpoint for epoch {} ...r_) r ValueErrorrKrLrZr}rrrf)rr7r.r|resultrrrload_blobs_from_checkpointss z%JobRunner.load_blobs_from_checkpointscCs|jstdyf|jjdd}|rhtjdj||j|jj||jj|tjd|jj dn tj dWn4t k r}ztj dj||WYdd}~XnXdS) aTriggers operation to save checkpoints This method will trigger the Save ops to serialize and persist the blobs present in the global workspaace. Args: epoch: An integer. The checkpoint epoch-id that we are saving. session: A Session object to execute the save ops. Raises: ValueError: When the checkpoint manager is invalid. zCheckpoint manager is NoneN)r.zSaving checkpoints for epoch {}zCheckpoints savedrgz$Checkpoint files cannot be accessed!z1Unable to write checkpoint for epoch {}. Error={}) rrrprKrLrZr{rhrjrfwarning Exception)rr.r|Z is_accessibleexrrrrs   zJobRunner.save_checkpoints)NNN)r&r'r(r)rrrrrrrrrs  HrcCs|j,tjd}|jg|dd}t|dWdQRX|j.tjd}|j|}t||djd}WdQRX|j|dS) z^ Creates a task that will output True when a given number of epochs has finished. Zepoch_counter_initrF)Z init_count)stepNZepoch_countdown)rrr) r rr<Z CreateCounterrrZ CountDownrr%)rZ num_epochsZinit_netcounterZ epoch_netfinishedr#rrr epoch_limiter3s   r)N)r0loggingZ caffe2.pythonrrZcaffe2.python.net_builderrZcaffe2.python.taskrrrrr r getLoggerr&rKZManagedr r/r5objectr6rqrrrrrrrs"  Z N%