Skip to content

Commit

Permalink
use (dataset, split) to determine private dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuyangh committed Apr 26, 2022
1 parent 9eb0e8e commit 86984f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions backend/src/impl/private_dataset.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from dataclasses import astuple

from explainaboard import DatalabLoaderOption

PRIVATE_DATASETS = [DatalabLoaderOption("fig_qa", None, "test")]

_private_dataset_lookup = set(astuple(dataset) for dataset in PRIVATE_DATASETS)
_private_dataset_lookup = set(
(dataset.dataset, dataset.split) for dataset in PRIVATE_DATASETS
)


def is_private_dataset(dataset: DatalabLoaderOption):
return astuple(dataset) in _private_dataset_lookup
return (dataset.dataset, dataset.split) in _private_dataset_lookup
8 changes: 7 additions & 1 deletion frontend/src/pages/LeaderboardPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export function LeaderboardPage() {
const subdataset = query.get("subdataset") || undefined;

if (task || dataset || subdataset) {
const title = subdataset || dataset || task;
let title = "";
if (dataset) {
title = dataset;
if (subdataset) title += ` (${subdataset})`;
} else if (task) {
title = task;
}
let subTitle;
if (subdataset) {
subTitle = `subdataset: ${subdataset}`;
Expand Down

0 comments on commit 86984f1

Please sign in to comment.