galb-dai commited on
Commit
17e6f21
·
2 Parent(s): 1b8f491 f456274

Merge branch 'main' of hf.co:spaces/double-ai/FormulaOne-Leaderboard

Browse files
README.md CHANGED
@@ -13,35 +13,28 @@ sdk_version: 5.42.0
13
  python_version: 3.12.0
14
  ---
15
 
16
- # Start the configuration
17
 
18
- Most of the variables to change for a default leaderboard are in `src/env.py` and `src/about.py`.
19
 
20
- Results files should have the following format and be stored as json files:
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- ```json
23
- {
24
- "config": {
25
- "model_dtype": "torch.float16", # or torch.bfloat16 or 8bit or 4bit
26
- "model_name": "path of the model on the hub: org/model",
27
- "model_sha": "revision on the hub",
28
- },
29
- "results": {
30
- "task_name": {
31
- "metric_name": score,
32
- },
33
- "task_name2": {
34
- "metric_name": score,
35
- }
36
- }
37
- }
38
- ```
39
 
40
- Request files are created automatically by this tool.
41
 
42
- # Code logic for more complex edits
 
 
43
 
44
- You'll find
45
- - The main table columns names and properties in `src/display/utils.py`
46
- - The logic to read all results and request files, then convert them in dataframe lines, in `src/populate.py`
47
- - The logic to allow or filter submissions in `src/submission/submit.py`.
 
13
  python_version: 3.12.0
14
  ---
15
 
 
16
 
17
+ ### Competition terms
18
 
19
+ - By submitting, you agree to the **FormulaOne Submission Agreement
20
+ (v1.2)** and our **Privacy Notice**.
21
+ - Your uploaded file remains yours; we only use it to evaluate, score,
22
+ and contact you about your result.
23
+ **Licensing for the public benchmark assets (informational)**
24
+ - **Evaluator code:** Apache License 2.0
25
+ - **Problem statements & public tests:** Creative Commons **CC BY 4.0**
26
+ See the project's **README licence section** and full texts: `LICENSE-
27
+ APACHE2`, `LICENSE-CC-BY` in our GitHub repo.
28
+ **Platform**
29
+ - Your use of Hugging Face is also governed by Hugging Face's Terms and
30
+ Privacy Policy.
31
+ -
32
 
33
+ # FormulaOne: Measuring the Depth of Algorithmic Reasoning Beyond Competitive Programming
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
+ This is the official Hugging Face space for the paper:
36
 
37
+ **FormulaOne: Measuring the Depth of Algorithmic Reasoning Beyond Competitive Programming** <br>
38
+ *Gal Beniamini, Yuval Dor, Alon Vinnikov, Shir Granot Peled, Or Weinstein, Or Sharir, Noam Wies, Tomer Nussbaum, Nadav Schweiger, Ido Ben Shaul, Tomer Zekharya, Yoav Levine, Shai Shalev-Shwartz, Amnon Shashua* <br>
39
+ **AAI, July 2025**
40
 
 
 
 
 
SECURITY.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ To report a vulnerability or security concern, email
2
3
+ Please include steps to reproduce and any relevant logs. We will
4
+ acknowledge receipt within 3 business days.
TRADEMARKS.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ &quot;FormulaOne&quot; is used solely to identify this research benchmark.
2
+ You may use the name to refer to the benchmark, but you may not use it:
3
+ - to imply sponsorship or endorsement of your project or results, or
4
+ - as part of your own product or service name without written
5
+ permission.
app.py CHANGED
@@ -512,6 +512,8 @@ with blocks:
512
  with gr.Row():
513
  gr.Markdown("# ✉️✨ Submit your solutions", elem_classes="markdown-text")
514
 
 
 
515
  login_box = gr.Group(visible=True, elem_id="f1-login-box")
516
  with login_box:
517
  gr.Markdown("Please sign in with Hugging Face to submit")
@@ -521,16 +523,47 @@ with blocks:
521
  with submit_panel:
522
  with gr.Row():
523
  with gr.Column():
524
- gr.Markdown(SUBMISSION_TERMS_TEXT, elem_classes="markdown-text")
525
-
526
  system_name_textbox = gr.Textbox(label=AutoEvalColumn.system.name)
527
  org_textbox = gr.Textbox(label=AutoEvalColumn.organization.name)
528
  submission_file = gr.File(label="JSONL solutions file", file_types=[".jsonl"])
529
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
530
  logger.info("Submit button")
531
- submit_button = gr.Button("Submit", variant="primary")
532
  submission_result = gr.Markdown()
533
 
 
 
 
 
 
 
 
 
 
 
 
534
  submit_button.click(
535
  add_solution_cbk,
536
  [
 
512
  with gr.Row():
513
  gr.Markdown("# ✉️✨ Submit your solutions", elem_classes="markdown-text")
514
 
515
+ gr.Markdown(SUBMISSION_TERMS_TEXT, elem_classes="markdown-text")
516
+
517
  login_box = gr.Group(visible=True, elem_id="f1-login-box")
518
  with login_box:
519
  gr.Markdown("Please sign in with Hugging Face to submit")
 
523
  with submit_panel:
524
  with gr.Row():
525
  with gr.Column():
 
 
526
  system_name_textbox = gr.Textbox(label=AutoEvalColumn.system.name)
527
  org_textbox = gr.Textbox(label=AutoEvalColumn.organization.name)
528
  submission_file = gr.File(label="JSONL solutions file", file_types=[".jsonl"])
529
 
530
+ # Required checkboxes
531
+ agreement_checkbox = gr.Checkbox(
532
+ label="I agree to the FormulaOne Submission Agreement (v1.2).",
533
+ value=False,
534
+ elem_classes="markdown-text",
535
+ )
536
+
537
+ privacy_checkbox = gr.Checkbox(
538
+ label="I have read the Privacy Notice.", value=False, elem_classes="markdown-text"
539
+ )
540
+
541
+ security_checkbox = gr.Checkbox(
542
+ label="I confirm this submission does not attempt to access private tests or exfiltrate data.",
543
+ value=False,
544
+ elem_classes="markdown-text",
545
+ )
546
+
547
+ gr.Markdown(
548
+ "[Privacy Notice](docs/privacy-policy.md); [Submission Agreement](terms/submission-agreement.md)",
549
+ elem_classes="markdown-text",
550
+ )
551
+
552
  logger.info("Submit button")
553
+ submit_button = gr.Button("Submit", variant="primary", interactive=False)
554
  submission_result = gr.Markdown()
555
 
556
+ # Update submit button interactivity based on checkboxes
557
+ def update_submit_button(agreement, privacy, security):
558
+ return gr.update(interactive=agreement and privacy and security)
559
+
560
+ for checkbox in [agreement_checkbox, privacy_checkbox, security_checkbox]:
561
+ checkbox.change(
562
+ update_submit_button,
563
+ inputs=[agreement_checkbox, privacy_checkbox, security_checkbox],
564
+ outputs=submit_button,
565
+ )
566
+
567
  submit_button.click(
568
  add_solution_cbk,
569
  [
docs/privacy-policy.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FormulaOne AI Coding Challenge - Privacy Notice v1.2
2
+ Last updated: 6 Aug 2025
3
+ 1 Controller
4
+ FormulaOne Team, &lt;legal entity and address&gt;
5
+ Contact: [email protected]
6
+ 2 Data We Collect
7
+ - GitHub or Hugging Face username and public profile ID
8
+ - Email address (if supplied via OAuth)
9
+ - Uploaded Submission files, compile/runtime logs, numeric scores
10
+ - IP address and browser telemetry for security and rate limiting
11
+ 3 Purposes and GDPR Legal Bases
12
+ Purpose | Basis
13
+ ---------------------------------------------- | -------------------
14
+ ---
15
+ Evaluate and rank submissions | Contract Art
16
+ 6(1)(b)
17
+ Site security and abuse prevention | Legitimate
18
+ interests 6(1)(f)
19
+ Academic, non-commercial research on models | Legitimate
20
+ interests 6(1)(f)
21
+ Contacting participants about results/collab | Legitimate
22
+ interests 6(1)(f)
23
+
24
+ 4 Public Disclosure
25
+ Your display name, score and rank appear on a public leaderboard.
26
+ You may use a pseudonym.
27
+ 5 Data Sharing
28
+ Processors: Hugging Face Inc., GitHub Inc., &lt;cloud host&gt; - under
29
+ written contracts.
30
+ Independent controllers: GitHub and Hugging Face regarding your
31
+ platform accounts.
32
+ 6 International Transfers
33
+ Where data moves outside the EEA/UK, we rely on EU Standard
34
+ Contractual Clauses or adequacy decisions.
35
+ 7 Retention
36
+ - Leaderboard entries: indefinitely.
37
+ - Raw submission files and logs: up to 5 years, then deleted or
38
+ anonymised.
39
+ - Security logs: 12 months.
40
+ 8 Your Rights
41
+ Access, correction, erasure, restriction, portability, and
42
+ objection. Contact us at the address above.
43
+ You may lodge a complaint with your supervisory authority.
44
+ 9 Security
45
+ Submissions run in network-restricted containers. Access is limited
46
+ to authorised staff using multi-factor authentication.
47
+ 10 Cookies
48
+ If you use only GitHub and Hugging Face, their cookies apply under
49
+ their policies. If you later self-host a site for the leaderboard,
50
+ publish your own cookie notice.
51
+ 11 Children
52
+ The Competition is not directed to children under 16. Do not submit
53
+ personal data if you are under 16.
54
+ 12 Changes
55
+ We will post updates here and notify registered participants by
56
+ email when material.
src/about.py CHANGED
@@ -108,7 +108,7 @@ WHAT_IS_F1_HTML_AFTER_TIER1FIG_TAIL = """
108
 
109
 
110
  SUBMISSION_TERMS_TEXT = """
111
- **Competition terms**
112
  - By submitting, you agree to the **FormulaOne Submission Agreement
113
  (v1.2)** and our **Privacy Notice**.
114
  - Your uploaded file remains yours; we only use it to evaluate, score,
 
108
 
109
 
110
  SUBMISSION_TERMS_TEXT = """
111
+ ### Competition terms
112
  - By submitting, you agree to the **FormulaOne Submission Agreement
113
  (v1.2)** and our **Privacy Notice**.
114
  - Your uploaded file remains yours; we only use it to evaluate, score,
src/display/css_html_js.py CHANGED
@@ -143,6 +143,43 @@ custom_css = """
143
  max-width: 800px !important; width: 100% !important; margin-left: auto !important; margin-right: auto !important;
144
  }
145
  #hf-login-btn:hover, #hf-login-btn button:hover, button[data-testid="login-button"]:hover, [data-testid="login-button"] button:hover, div[data-testid="login-button"] > button:hover { background: #f9fafb !important; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  """
147
 
148
  get_window_url_params = """
 
143
  max-width: 800px !important; width: 100% !important; margin-left: auto !important; margin-right: auto !important;
144
  }
145
  #hf-login-btn:hover, #hf-login-btn button:hover, button[data-testid="login-button"]:hover, [data-testid="login-button"] button:hover, div[data-testid="login-button"] > button:hover { background: #f9fafb !important; }
146
+
147
+ /* Checkbox styling for submission requirements */
148
+ .markdown-text input[type="checkbox"] {
149
+ margin-right: 8px !important;
150
+ width: 16px !important;
151
+ height: 16px !important;
152
+ accent-color: #2563eb !important;
153
+ cursor: pointer !important;
154
+ }
155
+
156
+ .markdown-text label[data-testid="checkbox"] {
157
+ color: var(--f1-text) !important;
158
+ font-size: 14px !important;
159
+ line-height: 1.5 !important;
160
+ cursor: pointer !important;
161
+ display: flex !important;
162
+ align-items: flex-start !important;
163
+ margin-bottom: 8px !important;
164
+ }
165
+
166
+ /* Submit button styling when disabled */
167
+ button[data-testid="button"]:disabled {
168
+ opacity: 0.5 !important;
169
+ cursor: not-allowed !important;
170
+ background: #f3f4f6 !important;
171
+ color: #9ca3af !important;
172
+ border-color: #d1d5db !important;
173
+ }
174
+
175
+ /* Required Agreements section
176
+ .markdown-text h3 {
177
+ color: var(--f1-text) !important;
178
+ font-weight: 600 !important;
179
+ margin: 20px 0 12px 0 !important;
180
+ font-size: 18px !important;
181
+ }
182
+ */
183
  """
184
 
185
  get_window_url_params = """
terms/submission-agreement.md ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FormulaOne AI Coding Challenge - Submission Agreement v1.2
2
+ Last updated: 6 Aug 2025
3
+ 1 Definitions
4
+ &quot;Submission&quot; means the code file you upload for a listed problem.
5
+ &quot;Organiser&quot; means the FormulaOne Team, c/o &lt;legal entity and address&gt;.
6
+
7
+ &quot;Competition Site&quot; means the leaderboard hosted at &lt;HF URL&gt;.
8
+ 2 Licence to Organiser
9
+ You retain all IP in your Submission. You grant the Organiser and its
10
+ academic partners a worldwide, royalty-free, non-exclusive licence to:
11
+ a) copy, run, test and modify the Submission solely to evaluate it
12
+ against public and private test cases;
13
+ b) store the Submission on secure servers;
14
+ c) manually review the Submission for non-commercial, scientific
15
+ research;
16
+ d) reproduce small code excerpts (&lt;= 25 lines) in research papers or
17
+ blogs;
18
+ e) contact you via the email linked to your platform account to ask
19
+ clarification questions, explore collaboration, or publicise notable
20
+ results.
21
+ 3 Security, Integrity and Acceptable Use
22
+ - You confirm the Submission contains no deliberately malicious code,
23
+ back-doors, attempts to exfiltrate data, or calls to external network
24
+ resources beyond what the submission guidelines permit.
25
+ - You will not attempt to discover, reconstruct, scrape, or share
26
+ private test cases, nor to probe the sandbox environment.
27
+ - The Organiser may refuse, delete, re-run or disqualify any
28
+ Submission at its sole discretion for suspected abuse, tampering or
29
+ rule violations.
30
+ 4 Competition Rules
31
+ - One account per team.
32
+ - You must own or have rights to your Submission.
33
+ - We may re-execute Submissions to confirm scores; ties may be broken
34
+ by earliest valid submission or additional hidden tests.
35
+ - We may correct or withdraw scores if errors or rule breaches are
36
+ discovered later.
37
+ 5 Leaderboard and Publicity
38
+ Your chosen display name, organisation (if provided), total score and
39
+ ranking may be shown publicly and archived indefinitely. You may use a
40
+ pseudonym.
41
+ 6 Ownership of Benchmark Assets
42
+ All evaluation code, problem statements and test data remain (c) 2025
43
+ FormulaOne Team and are licensed under Apache 2.0 (code) and CC BY 4.0
44
+ (content) as described in the public repository.
45
+ 7 Export Control and Sanctions Compliance
46
+ You represent that your participation is not prohibited by applicable
47
+ export-control or sanctions laws and that you are not located in, under
48
+ the control of, or a national or resident of any country or person
49
+ embargoed by relevant authorities.
50
+
51
+ 8 No Warranty
52
+ The benchmark and infrastructure are provided &quot;as is.&quot; To the maximum
53
+ extent permitted by law, the Organiser disclaims all warranties,
54
+ express or implied.
55
+ 9 Limitation of Liability
56
+ The Organiser&#39;s total liability arising out of or in connection with
57
+ the Competition will not exceed USD 100.
58
+ 10 Changes to Rules
59
+ We may update these terms and technical rules from time to time.
60
+ Material changes will be posted on the Competition Site and apply to
61
+ submissions made after the effective date.
62
+ 11 Governing Law and Venue
63
+ This Agreement is governed by the laws of England and Wales. The courts
64
+ of London, UK, have exclusive jurisdiction.
65
+ 12 Contact
66
+ Questions about these terms: [email protected]