mlflow/server/js/src/components/ExperimentView.js
/**
   * Convert an array of run infos to a CSV string, extracting the params and metrics in the
   * provided lists.
   */
Convert an array of run infos to a CSV string, extracting the params and metrics in the
provided lists.
Convert an array of run infos to a CSV string extracting the params and metrics in the provided lists .
static runInfosToCsv(
    runInfos,
    paramKeyList,
    metricKeyList,
    paramsList,
    metricsList,
    tagsList) {
    const columns = [
      "Run ID",
      "Name",
      "Source Type",
      "Source Name",
      "User",
      "Status",
    ];
    paramKeyList.forEach(paramKey => {
      columns.push(paramKey);
    });
    metricKeyList.forEach(metricKey => {
      columns.push(metricKey);
    });
    const data = runInfos.map((runInfo, index) => {
      const row = [
        runInfo.run_uuid,
        Utils.getRunName(tagsList[index]), 
        Utils.getSourceType(tagsList[index]),
        Utils.getSourceName(tagsList[index]),
        Utils.getUser(runInfo, tagsList[index]),
        runInfo.status,
      ];
      const paramsMap = ExperimentViewUtil.toParamsMap(paramsList[index]);
      const metricsMap = ExperimentViewUtil.toMetricsMap(metricsList[index]);
      paramKeyList.forEach((paramKey) => {
        if (paramsMap[paramKey]) {
          row.push(paramsMap[paramKey].getValue());
        } else {
          row.push("");
        }
      });
      metricKeyList.forEach((metricKey) => {
        if (metricsMap[metricKey]) {
          row.push(metricsMap[metricKey].getValue());
        } else {
          row.push("");
        }
      });
      return row;
    });
    return ExperimentView.tableToCsv(columns, data);
  }
static runInfosToCsv ( runInfos , paramKeyList , metricKeyList , paramsList , metricsList , tagsList ) { const columns = [ "Run ID" , "Name" , "Source Type" , "Source Name" , "User" , "Status" , ] ; paramKeyList . forEach ( paramKey => { columns . push ( paramKey ) ; } ) ; metricKeyList . forEach ( metricKey => { columns . push ( metricKey ) ; } ) ; const data = runInfos . map ( ( runInfo , index ) => { const row = [ runInfo . run_uuid , Utils . getRunName ( tagsList [ index ] ) , Utils . getSourceType ( tagsList [ index ] ) , Utils . getSourceName ( tagsList [ index ] ) , Utils . getUser ( runInfo , tagsList [ index ] ) , runInfo . status , ] ; const paramsMap = ExperimentViewUtil . toParamsMap ( paramsList [ index ] ) ; const metricsMap = ExperimentViewUtil . toMetricsMap ( metricsList [ index ] ) ; paramKeyList . forEach ( ( paramKey ) => { if ( paramsMap [ paramKey ] ) { row . push ( paramsMap [ paramKey ] . getValue ( ) ) ; } else { row . push ( "" ) ; } } ) ; metricKeyList . forEach ( ( metricKey ) => { if ( metricsMap [ metricKey ] ) { row . push ( metricsMap [ metricKey ] . getValue ( ) ) ; } else { row . push ( "" ) ; } } ) ; return row ; } ) ; return ExperimentView . tableToCsv ( columns , data ) ; }
Convert an array of run infos to a CSV string, extracting the params and metrics in the
 provided lists.
Convert an array of run infos to a CSV string extracting the params and metrics in the provided lists .
// add run name to csv export row