Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 18 additions & 5 deletions app/task3/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const metadata: Metadata = {

const finmrDataset = "https://huggingface.co/datasets/TheFinAI/FinMR";
const starterKit = "https://github.com/The-FinAI/IEEE-bigdata-cup/tree/main/finreason_task3";
const hiddenDataset = "https://huggingface.co/datasets/YanAdjeNole/FinReason-Task3";

type PhaseCard = {
name: string;
Expand All @@ -31,6 +32,8 @@ export default function Task3HubPage() {
const config = getTask3PublicConfig();
const scoringIsLive =
config.siteMode === "final" && config.scoringSpace.state === "ready";
const testIsLive =
config.siteMode === "final" && config.testSpace.state === "ready";

const phases: PhaseCard[] = [
{
Expand All @@ -48,16 +51,19 @@ export default function Task3HubPage() {
{
name: "Development",
slug: "development",
live: false,
gold: "Held by the organizers",
// Development runs on the same scoring workspace as practice, so it is
// live under exactly the same condition. Hard-coding this would let a
// build with no Task 3 configuration announce an open phase.
live: scoringIsLive,
gold: "680 held-out cases, answers withheld",
feedback: "Score, rank, and a public leaderboard",
ranked: "Ranked",
},
{
name: "Test",
slug: "test",
live: false,
gold: "Held by the organizers",
live: testIsLive,
gold: "680 held-out cases, answers withheld",
feedback: "An acceptance receipt only",
ranked: "Decides the final result",
},
Expand Down Expand Up @@ -145,7 +151,7 @@ export default function Task3HubPage() {
<div className="task-platform-copy">
<div>
<p className="section-index">DATA</p>
<h2 id="task3-data-title">Where the practice data comes from</h2>
<h2 id="task3-data-title">Where the data comes from</h2>
</div>
<p>
This site hosts no Task 3 files. The 332 public practice cases are the Financial
Expand All @@ -154,6 +160,13 @@ export default function Task3HubPage() {
<a href={starterKit}>Task 3 starter kit</a> downloads them for you, and ships the
validator, the scorer, and one baseline per way of running a model.
</p>
<p>
The development and test questions are published separately, without their
answers, as{" "}
<a href={hiddenDataset}>YanAdjeNole/FinReason-Task3</a> — 680 cases each. They
carry no rule label: for one of the three rules the label alone gives away the
answer&rsquo;s shape.
</p>
</div>
<p className="task-platform-footnote">
Every one of the 332 practice cases is built around one flagged Data Quality
Expand Down
9 changes: 8 additions & 1 deletion app/task3/submission-guide.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? "";
const starterKit = "https://github.com/The-FinAI/IEEE-bigdata-cup/tree/main/finreason_task3";
const hiddenDataset = "https://huggingface.co/datasets/YanAdjeNole/FinReason-Task3";

type SubmissionGuideProps = {
scoringSpaceUrl: string | null;
Expand Down Expand Up @@ -51,12 +52,18 @@ export function SubmissionGuide({
<li>
<span className="submission-step-number" aria-hidden="true">01</span>
<div>
<h3><span className="sr-only">Step 1 of 5: </span>Get the practice data.</h3>
<h3><span className="sr-only">Step 1 of 5: </span>Get the data.</h3>
<p>
Clone the <a href={starterKit}>Task 3 starter kit</a> and run its prepare script.
It downloads the 332 public cases and writes both the answered and unanswered
copies.
</p>
<p>
For the two ranked phases, download{" "}
<code>development_inputs.jsonl</code> and <code>test_inputs.jsonl</code> from{" "}
<a href={hiddenDataset}>YanAdjeNole/FinReason-Task3</a>. Each holds 680
questions with the answers withheld, and no rule label.
</p>
<pre tabIndex={0} aria-label="Prepare the practice data"><code>{prepareCommand}</code></pre>
</div>
</li>
Expand Down
48 changes: 44 additions & 4 deletions tests/rendered-html.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,20 @@ test("publishes the Task 3 participant hub with honest phase status", async () =
assert.notEqual(rowOf(slug), "", `${slug} row is missing`);
}

// Development and test have no datasets, in any build.
for (const slug of ["development", "test"]) {
assert.match(rowOf(slug), /data-state="pending"/, `${slug} must be pending`);
assert.doesNotMatch(rowOf(slug), /data-state="ready"/, `${slug} must not claim to be live`);
// The hidden datasets exist now, so these rows are no longer pinned to
// pending. What must still hold is that no row claims to be open in a build
// that has no workspace to send people to -- the original defect. Each row
// tracks its own workspace: practice and development share the scoring one,
// test has its own.
const panelPending = /<dd>Link under verification<\/dd>/.test(hub);
for (const slug of ["practice", "development", "test"]) {
if (panelPending) {
assert.match(
rowOf(slug),
/data-state="pending"/,
`${slug} must be pending while the site has no verified Space`,
);
}
}

// Practice tracks the configuration, and this assertion works in BOTH site
Expand All @@ -295,6 +305,15 @@ test("publishes the Task 3 participant hub with honest phase status", async () =
"the practice row disagrees with the quick-facts panel",
);

// Development runs on the same workspace as practice, so the two rows must
// never disagree: one of them being open while the other is not would mean
// the page is reporting a workspace state that does not exist.
assert.equal(
/data-state="ready"/.test(rowOf("development")),
/data-state="ready"/.test(rowOf("practice")),
"development and practice share a workspace but report different states",
);

// The page must never contradict itself: if the panel says the link is still
// being verified, no phase row may simultaneously claim to be open. This holds
// in both site modes, which is why it is the assertion that would have caught
Expand Down Expand Up @@ -443,6 +462,27 @@ test("a Task 3 phase the hub calls open has a working upload link", async () =>
);
});

test("an open ranked phase says where to get its questions", async () => {
// "Development: Live" is an empty claim if the questions are nowhere to be
// found. The gold stays private, but the inputs must be reachable from both
// the hub and the guide before either page calls those phases open.
const [hub, submit] = await Promise.all([
text("out/task3/index.html"),
text("out/task3/submit/index.html"),
]);
const devRow = hub.match(/<tr[^>]*data-phase="development"[\s\S]*?<\/tr>/)?.[0] ?? "";
const ranked = /data-state="ready"/.test(devRow);
const dataset = /huggingface\.co\/datasets\/[\w.-]+\/FinReason-Task3/;
if (!ranked) return;
for (const [name, page] of [["hub", hub], ["submit guide", submit]]) {
assert.match(
page,
dataset,
`${name} calls development open but never says where its questions are`,
);
}
});

test("the home page links to all three task hubs", async () => {
// A participant site nobody can navigate to does not do its job. The Task 3
// route existed in the sitemap but no page linked to it.
Expand Down
Loading