@@ -379,7 +379,14 @@ def _build_single_dataset(self, split, shuffle_files, batch_size,
379
379
380
380
if shuffle_files is None :
381
381
# Shuffle files if training
382
- shuffle_files = split == splits_lib .Split .TRAIN
382
+ if split == splits_lib .Split .TRAIN :
383
+ logging .warning (
384
+ "Warning: Setting shuffle_files=True because split=TRAIN and "
385
+ "shuffle_files=None. This behavior will be deprecated on "
386
+ "2019-08-06, "
387
+ "at which point shuffle_files=False will be the default for all "
388
+ "splits." )
389
+ shuffle_files = True
383
390
384
391
wants_full_dataset = batch_size == - 1
385
392
if wants_full_dataset :
@@ -409,10 +416,10 @@ def _build_single_dataset(self, split, shuffle_files, batch_size,
409
416
# to do by using a requested version of tf.data.Dataset.cache that can
410
417
# persist a cache beyond iterator instances.
411
418
if not dataset_shape_is_fully_defined :
412
- tf . logging .warning ("Called in_memory=True on a dataset that does not "
413
- "have fully defined shapes. Note that features with "
414
- "variable length dimensions will be 0-padded to "
415
- "the maximum length across the dataset." )
419
+ logging .warning ("Called in_memory=True on a dataset that does not "
420
+ "have fully defined shapes. Note that features with "
421
+ "variable length dimensions will be 0-padded to "
422
+ "the maximum length across the dataset." )
416
423
full_bs = self .info .splits .total_num_examples or sys .maxsize
417
424
# If using in_memory, escape all device contexts so we can load the data
418
425
# with a local Session.
0 commit comments