()
define flags for evaluator
define flags for evaluator
define flags for evaluator
def define_flags():
  ''' define flags for evaluator'''
  # The GPU devices which are visible for current process
  flags.DEFINE_string('gpu', '', 'same to CUDA_VISIBLE_DEVICES')
  flags.DEFINE_string('config', None, help='path to yaml config file')
  flags.DEFINE_enum('mode', 'eval', ['eval', 'infer', 'eval_and_infer'],
                    'eval or infer')
  flags.DEFINE_bool('debug', False, 'debug mode')
  # https://github.com/abseil/abseil-py/blob/master/absl/flags/_validators.py#L330
  flags.mark_flags_as_required(['config', 'mode'])
def define_flags ( ) : # The GPU devices which are visible for current process flags . DEFINE_string ( 'gpu' , '' , 'same to CUDA_VISIBLE_DEVICES' ) flags . DEFINE_string ( 'config' , None , help = 'path to yaml config file' ) flags . DEFINE_enum ( 'mode' , 'eval' , [ 'eval' , 'infer' , 'eval_and_infer' ] , 'eval or infer' ) flags . DEFINE_bool ( 'debug' , False , 'debug mode' ) # https://github.com/abseil/abseil-py/blob/master/absl/flags/_validators.py#L330 flags . mark_flags_as_required ( [ 'config' , 'mode' ] )