parameters: (run_config)
docstring: Validates the properties.
docstring_summary: Validates the properties.
docstring_tokens: Validates the properties .
function: def _validate_properties(run_config):
    """Validates the properties."""
    def _validate(property_name, cond, message):
      property_value = getattr(run_config, property_name)
      if property_value is not None and not cond(property_value):
        raise ValueError(message)
  
    _validate('model_dir', lambda dir: dir,
              message='model_dir should be non-empty')
  
    _validate('save_summary_steps', lambda steps: steps >= 0,
              message='save_summary_steps should be >= 0')
  
    _validate('save_checkpoints_steps', lambda steps: steps >= 0,
              message='save_checkpoints_steps should be >= 0')
    _validate('save_checkpoints_secs', lambda secs: secs >= 0,
              message='save_checkpoints_secs should be >= 0')
  
    _validate('session_config',
              lambda sc: isinstance(sc, config_pb2.ConfigProto),
              message='session_config must be instance of ConfigProto')
  
    _validate('keep_checkpoint_max', lambda keep_max: keep_max >= 0,
              message='keep_checkpoint_max should be >= 0')
    _validate('keep_checkpoint_every_n_hours', lambda keep_hours: keep_hours > 0,
              message='keep_checkpoint_every_n_hours should be > 0')
    _validate('log_step_count_steps', lambda num_steps: num_steps > 0,
              message='log_step_count_steps should be > 0')
  
    _validate('tf_random_seed', lambda seed: isinstance(seed, six.integer_types),
              message='tf_random_seed must be integer.')
function_tokens: def _validate_properties ( run_config ) : def _validate ( property_name , cond , message ) : property_value = getattr ( run_config , property_name ) if property_value is not None and not cond ( property_value ) : raise ValueError ( message ) _validate ( 'model_dir' , lambda dir : dir , message = 'model_dir should be non-empty' ) _validate ( 'save_summary_steps' , lambda steps : steps >= 0 , message = 'save_summary_steps should be >= 0' ) _validate ( 'save_checkpoints_steps' , lambda steps : steps >= 0 , message = 'save_checkpoints_steps should be >= 0' ) _validate ( 'save_checkpoints_secs' , lambda secs : secs >= 0 , message = 'save_checkpoints_secs should be >= 0' ) _validate ( 'session_config' , lambda sc : isinstance ( sc , config_pb2 . ConfigProto ) , message = 'session_config must be instance of ConfigProto' ) _validate ( 'keep_checkpoint_max' , lambda keep_max : keep_max >= 0 , message = 'keep_checkpoint_max should be >= 0' ) _validate ( 'keep_checkpoint_every_n_hours' , lambda keep_hours : keep_hours > 0 , message = 'keep_checkpoint_every_n_hours should be > 0' ) _validate ( 'log_step_count_steps' , lambda num_steps : num_steps > 0 , message = 'log_step_count_steps should be > 0' ) _validate ( 'tf_random_seed' , lambda seed : isinstance ( seed , six . integer_types ) , message = 'tf_random_seed must be integer.' )