Skip to content
Snippets Groups Projects
Commit c8b63d17 authored by deep1401's avatar deep1401
Browse files

Correct the table to show both task names correctly for basic as well as normal evals

parent d3c83d59
Branches
Tags
No related merge requests found
...@@ -20,7 +20,20 @@ function formatTemplateConfig(script_parameters): ReactElement { ...@@ -20,7 +20,20 @@ function formatTemplateConfig(script_parameters): ReactElement {
// Remove the author/full path from the model name for cleanliness // Remove the author/full path from the model name for cleanliness
// const short_model_name = c.model_name.split('/').pop(); // const short_model_name = c.model_name.split('/').pop();
// Set main_task as either or the metric name from the script parameters // Set main_task as either or the metric name from the script parameters
const main_task = script_parameters.tasks const main_task = (() => {
if (script_parameters.tasks) {
try {
const tasksArray = JSON.parse(script_parameters.tasks);
if (Array.isArray(tasksArray)) {
return tasksArray.map((task) => task.name).join(', ');
}
} catch (error) {
// Invalid JSON; fall back to the original value
}
return script_parameters.tasks;
}
return script_parameters.tasks;
})();
const dataset_name = script_parameters.dataset_name const dataset_name = script_parameters.dataset_name
? script_parameters.dataset_name ? script_parameters.dataset_name
: 'N/A'; : 'N/A';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment