Skip to content

Commit

Permalink
Add metric info
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiWaldrant committed Nov 13, 2024
1 parent c63659e commit 81a47ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
1 change: 0 additions & 1 deletion results/_include/_method_descriptions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ lines <- pmap_chr(method_info %>% filter(!is_baseline), function(method_name, me
"bi bi-tag", paste0(code_version),
)
meta_list <- paste(
paste0("<i class=\"", method_meta$icon, "\"></i> ", method_meta$value),
collapse = " · "
Expand Down
17 changes: 16 additions & 1 deletion results/_include/_metric_descriptions.qmd
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
```{r}
#| echo: false
lines <- pmap_chr(metric_info, function(metric_name, metric_summary, metric_description, paper_reference, ...) {
lines <- pmap_chr(metric_info, function(metric_name, metric_summary, metric_description, paper_reference, implementation_url, code_version, image, ...) {
ref <- split_cite_fun(paper_reference)
if (ref != "") ref <- paste0(" ", ref)
summ <- (metric_summary %|% "Missing 'metric_summary'") %>% str_replace_all("\\n", " ") %>% str_replace_all("\\. *$", "")
metric_meta <- tribble(
~icon, ~value,
"bi bi-file-earmark-code", paste0("[implementation](", implementation_url, ")"),
"bi bi-box-seam", paste0("[container](", image, ")"),
"bi bi-tag", paste0(code_version),
)
meta_list <- paste(
paste0("<i class=\"", metric_meta$icon, "\"></i> ", metric_meta$value),
collapse = " · "
)
strip_margin(glue::glue("
|### {metric_name}
|
|{meta_list}
|
|{summ}{ref}.
|
|{metric_description %|% ''}
Expand Down
10 changes: 5 additions & 5 deletions results/perturbation_prediction/data/metric_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_error",
"image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_error:build_main",
"code_version": null,
"code_version": "build_main",
"commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e",
"maximize": false
},
Expand All @@ -25,7 +25,7 @@
},
"implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_error",
"image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_error:build_main",
"code_version": null,
"code_version": "build_main",
"commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e",
"maximize": false
},
Expand All @@ -40,7 +40,7 @@
},
"implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_correlation",
"image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_correlation:build_main",
"code_version": null,
"code_version": "build_main",
"commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e",
"maximize": true
},
Expand All @@ -55,7 +55,7 @@
},
"implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_correlation",
"image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_correlation:build_main",
"code_version": null,
"code_version": "build_main",
"commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e",
"maximize": true
},
Expand All @@ -70,7 +70,7 @@
},
"implementation_url": "https://github.com/openproblems-bio/task_perturbation_prediction/blob/2fa44462b1e7d530bad703c4a20ed22b49d3705e/src/metrics/mean_rowwise_correlation",
"image": "ghcr.io/openproblems-bio/task_perturbation_prediction/metrics/mean_rowwise_correlation:build_main",
"code_version": null,
"code_version": "build_main",
"commit_sha": "2fa44462b1e7d530bad703c4a20ed22b49d3705e",
"maximize": true
}
Expand Down

0 comments on commit 81a47ec

Please sign in to comment.