Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(webpage): Add IR test page #293

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions webpage/.netlify/edge-functions-import-map.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"imports":{"netlify:edge":"https://edge.netlify.com/v1/index.ts"}}
4 changes: 3 additions & 1 deletion webpage/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
baseURL = "https://embeddings.ml"
languageCode = "en-us"
title = "Clarin-PL Embeddigs Library"
theme = "hugo-geekdoc"
theme = "hugo-geekdoc"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why add commented lines?

#[template]
# options = ["missingkey=zero"]
11 changes: 11 additions & 0 deletions webpage/content/tasks/taskIR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
url: "/tasks/InformationRetrieval"
type: docs
geekdocNav: false
geekdocBreadcrumb: false
---

{{< pageHeader >}}
{{< info taskname="Information Retrieval" taskdesc="Information Retrieval test description">}}
{{< averageResults tasktype="Information Retrieval" >}}
{{< results type="Information Retrieval" >}}
25 changes: 25 additions & 0 deletions webpage/data/results/msmarco_bm_25.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding entire table 3 and link source https://arxiv.org/pdf/2305.19840.pdf (add to utils table to json converter?)

"submission_name": "msmarco_bm_25",
"dataset_name": "MSMARCO",
"dataset_version": "0.0.0",
"embedding_name": "BM25",
"hparams": {},
"packages": [],
"config": null,
"leaderboard_task_name": "Information Retrieval",
"metrics": [
{
"NDCG@10": 31.50,
"MRR@10": 56.36
}
],
"metrics_avg": {
"NDCG@10": 31.50,
"MRR@10": 56.36
},
"metrics_std": {
"NDCG@10": 0.0,
"MRR@10": 0.0
},
"averaged_over": 1
}
25 changes: 25 additions & 0 deletions webpage/data/results/msmarco_ict.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"submission_name": "msmarco_ict",
"dataset_name": "MSMARCO",
"dataset_version": "0.0.0",
"embedding_name": "ICT",
"hparams": {},
"packages": [],
"config": null,
"leaderboard_task_name": "Information Retrieval",
"metrics": [
{
"NDCG@10": 29.02,
"MRR@10": 43.91
}
],
"metrics_avg": {
"NDCG@10": 29.02,
"MRR@10": 43.91
},
"metrics_std": {
"NDCG@10": 0.0,
"MRR@10": 0.0
},
"averaged_over": 1
}
14 changes: 8 additions & 6 deletions webpage/layouts/shortcodes/averageResults.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@

{{ $metrics := slice }}
{{ $metricsToIgnore := slice "classes" "f1_weighted" "recall_weighted" "precision_weighted" }}
{{ range $.Site.Data.results }}
{{ range $k, $v := .metrics_avg }}
{{if (not (in $metricsToIgnore $k)) }}
{{ $metrics = uniq ($metrics | append $k) }}
{{end}}
{{ end }}
{{ range $file, $result := $.Site.Data.results }}
{{if or (eq $tasktype "Tasks") (eq (index $result "leaderboard_task_name") $tasktype)}}
{{ range $k, $v := .metrics_avg }}
{{if (not (in $metricsToIgnore $k)) }}
{{ $metrics = uniq ($metrics | append $k) }}
{{end}}
{{ end }}
{{end}}
{{ end }}
{{ $sum := slice }}
<style scoped>
Expand Down
3 changes: 2 additions & 1 deletion webpage/layouts/shortcodes/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ <h1 class="title">LEPISZCZE</h1>
"Entailment Classification",
"Aspect-based Sentiment Analysis",
"Abusive Clauses Detection",
"Dialogue Acts Classification"
"Dialogue Acts Classification",
"Information Retrieval"
];
const container = document.getElementById("tasks-container");
taskTypes.forEach((type) => {
Expand Down
38 changes: 27 additions & 11 deletions webpage/layouts/shortcodes/results.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
{{ $type := default "Tasks" (.Get "type") }}
{{ $leaderboard := slice "leaderboard_task_name"}}
{{ $metrics := slice }}
{{ $metricsToIgnore := slice "classes" "f1_weighted" "recall_weighted" "precision_weighted" }}
{{ range $.Site.Data.results }}
{{ range $k, $v := .metrics_avg }}
{{if (not (in $metricsToIgnore $k)) }}
{{ $metrics = uniq ($metrics | append $k) }}
{{end}}
{{ end }}
{{ end }}

{{ $metricsStd := slice }}
{{ range $.Site.Data.results }}
Expand All @@ -23,21 +15,32 @@
{{ $classHeaderItems := slice}}
{{ $datasets := slice }}
{{ range $file, $result := $.Site.Data.results }}

<div id="modal-data{{$file}}" style="display:none;">{"items":[{{ range $i, $m := .metrics_avg.classes }}{"class_name": "{{$i}}",{{ range $key, $result := $m}}"{{$key}}":"{{$result}}",{{end}}},{{end}}]}</div>


{{ $hasClassesKey := false }}
{{ range $key, $_ := .metrics_avg}}
{{ if eq $key "classes" }}
{{ $hasClassesKey = true }}
{{ end }}
{{ end }}

{{ if $hasClassesKey }}
<div id="modal-data{{$file}}" style="display:none;">{"items":[{{ range $i, $m := .metrics_avg.classes }}{"class_name": "{{$i}}",{{ range $key, $result := $m}}"{{$key}}":"{{$result}}",{{end}}},{{end}}]}</div>
{{end}}

{{if or (eq $type "Tasks") (eq (index $result $leaderboard) $type)}}
{{ $datasets = uniq ($datasets | append (index $result "dataset_name")) }}
{{end}}

<textarea style="display:none;" id="json-input{{$file}}" autocomplete="off">{{jsonify (dict "indent" " ") $result}}</textarea>


{{ if $hasClassesKey }}
{{ range $m := .metrics_avg.classes }}
{{ range $key, $result := $m}}
{{ $classHeaderItems = uniq ($classHeaderItems | append $key) }}
{{end}}
{{end}}
{{end}}

{{end}}

Expand Down Expand Up @@ -130,6 +133,19 @@

<div id="content" style="display: none;">
{{ range $index, $dataset := $datasets }}
{{ $metrics := slice }}
{{ range $file, $result := $.Site.Data.results }}
{{if or (eq $type "Tasks") (eq (index $result $leaderboard) $type)}}
{{if eq (index $result "dataset_name") $dataset }}
{{ range $k, $v := .metrics_avg }}
{{if (not (in $metricsToIgnore $k)) }}
{{ $metrics = uniq ($metrics | append $k) }}
{{end}}
{{ end }}
{{end}}
{{end}}
{{ end }}

<div>
<table id="data-table-{{$index}}" >
<thead>
Expand Down
Loading