def _get_features_and_labels_from_input_fn(self, input_fn, mode):
    slot_configs = self._set_model_configs(mode)

    def input_fn_wrapper(*args, **kwargs):
        dataset = input_fn(self._bridge, self._trainer_master)

        def mapper(features, *args):
            features.update(self._preprocess_fids(features.pop('fids'), slot_configs))
            return (((features,) + args) if args else features)
        dataset = dataset.map(mapper, num_parallel_calls=tf.data.experimental.AUTOTUNE)
        dataset = dataset.prefetch(2)
        return dataset
    return super(SparseFLEstimator, self)._get_features_and_labels_from_input_fn(input_fn_wrapper, mode)
def _get_features_and_labels_from_input_fn(self, input_fn, mode):
    slot_configs = self._set_model_configs(mode)

    def input_fn_wrapper(*args, **kwargs):
        dataset = input_fn(self._bridge, self._trainer_master)

        def mapper(features, *args):
            features.update(self._preprocess_fids(features.pop('fids'), slot_configs))
            return (((features,) + args) if args else features)
        dataset = dataset.map(mapper, num_parallel_calls=tf.data.experimental.AUTOTUNE)
        dataset = dataset.prefetch(2)
        return dataset
    return super(SparseFLEstimator, self)._get_features_and_labels_from_input_fn(input_fn_wrapper, mode)