def _set_model_configs(self, mode):
    with tf.Graph().as_default() as g:
        M = SparseFLModel(self._role, self._bridge, None, config_run=True)
        try:
            self._model_fn(M, None, None, mode)
        except ConfigRunError as e:
            self._bias_slot_configs = M._get_bias_slot_configs()
            self._vec_slot_configs = M._get_vec_slot_configs()
            self._feature_columns = M.get_feature_columns()
            self._slot_configs = [self._bias_slot_configs, self._vec_slot_configs]
            return self._slot_configs
    raise UserWarning('Failed to get model config. Did you forget to call                            freeze_slots in model_fn?')
def _set_model_configs(self, mode):
    with tf.Graph().as_default() as g:
        M = SparseFLModel(self._role, self._bridge, None, config_run=True)
        try:
            self._model_fn(M, None, None, mode)
        except ConfigRunError as e:
            self._bias_slot_configs = M._get_bias_slot_configs()
            self._vec_slot_configs = M._get_vec_slot_configs()
            self._feature_columns = M.get_feature_columns()
            self._slot_configs = [self._bias_slot_configs, self._vec_slot_configs]
            return self._slot_configs
    raise UserWarning('Failed to get model config. Did you forget to call                            freeze_slots in model_fn?')