olympiads-ref / README.md
mavi88's picture
edit README.md: add folder for download_script
dafdb2f
|
raw
history blame
4.85 kB
metadata
pretty_name: Olympiads Reference Dataset

AI-MO Olympiad Reference Dataset

This dataset contains a structured collection of Olympiad problems and their solutions, organized by competition. Contains high quality data, prioritizing "official" solutions to problems.

Structure

<competition name>/    # Problems and solutions from the International Mathematical Olympiad
├── raw/               # Raw problem/solution statements (.pdf)
│   ├── file1.pdf
│   ├── file2.pdf
├── download_script/   # the scripts used to download raw data
│   ├── download.py    
├── md/                # .md files generated from raw/ files
│   ├── file1.md
│   ├── file2.md
├── segment_script/    # the scripts used to segment the data
│   ├── segment.py     
└── segmented/         # .jsonl segmented data for easier processing
    ├── file1.jsonl
    ├── file2.jsonl
    └── file3.jsonl

Each json in jsonl file follows this structure:

{
 "problem": "string",        // Mandatory: The problem statement in latex or markdown
 "solution": "string",       // Mandatory: The solution for the problem
 "year": "int",              // Optional: Year when the problem was presented
 "problem_type": "string",   // Optional: The mathematical domain of the problem. Here are the supported types: 
                             //['Algebra', 'Geometry', 'Number Theory', 'Combinatorics', 'Calculus',
                             //'Inequalities', 'Logic and Puzzles', 'Other']
 "question_type": "string",  // Optional: The form or style of the mathematical problem. 
                             // The supported classes are: ['MCQ', 'proof' or 'math-word-problem']. 
                             // 'math-word-problem' is a problem with output. 
 "answer": "string",         // Optional: final answer is the question_type is "math-word-problem".
 "source": "string",         // Optional: TODO:describe
 "exam": "string",           // Optional: TODO:describe
 "difficulty": "int",        // Optional: TODO:describe
 "other": "...",             // Optional: You can add other fields with metadata
}

Steps to collect data for formalization

1. Assign yourself a task

Check the tracker and assign yourself one line by updating columns:

  • status: IN PROGRESS
  • assignee: your name

2. Setup

Download data locally.

git lfs install
git clone git@hf.co:datasets/AI-MO/olympiads-ref

3. Find .pdf ressources.

First check if there are already available .pdf in https://huggingface.co/AI-MO/olympiads-0.1 * if yes upload them in AI-MO/olympiads-ref/<competition>/raw/ and continue to step 4. * if no, find sources in internet (preferably with official solution), download and upload in AI-MO/olympiads-ref/<competition>/raw/

4. Find .md ressources.

First check if there are already available .pdf in https://huggingface.co/AI-MO/olympiads-0.1 * if yes upload in AI-MO/olympiads-ref/<competition>/md/ and continue to step 6. * if no, find sources in internet (preferably with official solution), download and upload in AI-MO/olympiads-ref/<competition>/md/

5. Convert .pdf to .md using Mathpix

Use new_pipeline. Example:

python -m new_pipeline convert_to_md --method=pdf_to_md --input_dir="/home/marvin/workspace/olympiads-ref/IMO/raw" --output_dir="/home/marvin/workspace/olympiads-ref/IMO/md"

6. Segment the .md files into .jsonl

Write a segment.py that can be applied to your data (please do sanity checks!). Examples are this or that. Once you are fine with your segmentation upload the .jsonl in AI-MO/olympiads-ref/<competition>/segmented/ and the segment.py in AI-MO/olympiads-ref/<competition>/segment_script/.

Ask for a review.

7. Update the status in the tracker

Update the tracker with columns: * status: DONE + a link to your generated data in hf * problem_count: count of problems in data * solution_count: count of solutions in data (different than problem_count since a problem can have several solutions) * years: range of competition years covered in your data (so we can easily track if many years are missing) * assignee: your name

8. Integrate the data in a base dataset

Create a ticket in git