@@ -283,29 +283,13 @@ def set_up_synthetic_data():
283
283
_monkey_patch_dataset_method (tf .distribute .MirroredStrategy )
284
284
_monkey_patch_dataset_method (
285
285
tf .distribute .experimental .MultiWorkerMirroredStrategy )
286
- # TODO(tobyboyd): Remove when contrib.distribute is all in core.
287
- if hasattr (tf , 'contrib' ):
288
- _monkey_patch_dataset_method (tf .contrib .distribute .MirroredStrategy )
289
- _monkey_patch_dataset_method (tf .contrib .distribute .OneDeviceStrategy )
290
- _monkey_patch_dataset_method (
291
- tf .contrib .distribute .CollectiveAllReduceStrategy )
292
- else :
293
- print ('Contrib missing: Skip monkey patch tf.contrib.distribute.*' )
294
286
295
287
296
288
def undo_set_up_synthetic_data ():
297
289
_undo_monkey_patch_dataset_method (tf .distribute .OneDeviceStrategy )
298
290
_undo_monkey_patch_dataset_method (tf .distribute .MirroredStrategy )
299
291
_undo_monkey_patch_dataset_method (
300
292
tf .distribute .experimental .MultiWorkerMirroredStrategy )
301
- # TODO(tobyboyd): Remove when contrib.distribute is all in core.
302
- if hasattr (tf , 'contrib' ):
303
- _undo_monkey_patch_dataset_method (tf .contrib .distribute .MirroredStrategy )
304
- _undo_monkey_patch_dataset_method (tf .contrib .distribute .OneDeviceStrategy )
305
- _undo_monkey_patch_dataset_method (
306
- tf .contrib .distribute .CollectiveAllReduceStrategy )
307
- else :
308
- print ('Contrib missing: Skip remove monkey patch tf.contrib.distribute.*' )
309
293
310
294
311
295
def configure_cluster (worker_hosts = None , task_index = - 1 ):
0 commit comments