original_docstring: Create/serialize point evaluation report and return as well
docstring: Create/serialize point evaluation report and return as well
docstring_tokens: Create / serialize point evaluation report and return as well
code: def point_eval_experiment(experiment, config):
      '''Create/serialize point evaluation report and return as well'''
      experiment_name = Path(experiment).name
      eval_dir = get_exp_subdir('evaluation_dir', experiment, config)
      pe_score_report_fpath = op.join(eval_dir, experiment_name + '_point_evaluation_report.json')
      extended_report_fname = config['evaluation']['points']['by_track_report_file']
      if extended_report_fname is not None and len(extended_report_fname) > 0:
          extended_report_fpath = op.join(eval_dir, extended_report_fname)
      else:
          extended_report_fpath = None
  
      # Get true and proposed tracks
      label_csv_fpath = op.join(get_exp_subdir('label_dir', experiment, config),
                                  f'{experiment_name}_labels.csv')
      if not op.exists(label_csv_fpath):
          logging.warning('No labels found for experiment {}. Skipping.'
                      .format(experiment))
          return None
  
      track_fpaths = sorted(glob.glob(op.join(
          get_exp_subdir('track_dir', experiment, config), '*.json')))
  
      # Run point evaluation. Results saved to `pe_score_report_fpath`
      return (experiment,
              run_point_evaluation(label_csv_fpath, track_fpaths, pe_score_report_fpath,
                                   extended_report_fpath, config))
code_tokens: def point_eval_experiment ( experiment , config ) : experiment_name = Path ( experiment ) . name eval_dir = get_exp_subdir ( 'evaluation_dir' , experiment , config ) pe_score_report_fpath = op . join ( eval_dir , experiment_name + '_point_evaluation_report.json' ) extended_report_fname = config [ 'evaluation' ] [ 'points' ] [ 'by_track_report_file' ] if extended_report_fname is not None and len ( extended_report_fname ) > 0 : extended_report_fpath = op . join ( eval_dir , extended_report_fname ) else : extended_report_fpath = None label_csv_fpath = op . join ( get_exp_subdir ( 'label_dir' , experiment , config ) , f'{experiment_name}_labels.csv' ) if not op . exists ( label_csv_fpath ) : logging . warning ( 'No labels found for experiment {}. Skipping.' . format ( experiment ) ) return None track_fpaths = sorted ( glob . glob ( op . join ( get_exp_subdir ( 'track_dir' , experiment , config ) , '*.json' ) ) ) return ( experiment , run_point_evaluation ( label_csv_fpath , track_fpaths , pe_score_report_fpath , extended_report_fpath , config ) )
short_docstring: Create/serialize point evaluation report and return as well
short_docstring_tokens: Create / serialize point evaluation report and return as well
comment: '''Create/serialize point evaluation report and return as well'''$SEP$# Get true and proposed tracks$SEP$# Run point evaluation. Results saved to `pe_score_report_fpath`