File size: 874 Bytes
69e02ea
 
 
 
 
 
 
 
4ae081d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6d6e9ae
a8783bc
4ae081d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
license: apache-2.0
language:
- en
tags:
- math
- google
---
apolocheese for poor format, it's because I Don't Care (i'm tired and still working)
data from: https://github.com/google-deepmind/mathematics_dataset

```python
from huggingface_hub import snapshot_download
from datasets import load_dataset
import os

def get_all_files(directory):
    file_paths = []
    for root, dirs, files in os.walk(directory):
        for name in files:
            full_path = os.path.join(root, name)
            file_paths.append(os.path.abspath(full_path))
    return file_paths

DATA_SPLIT="train-easy" # extrapolate, interpolate, train-easy, train-hard, train-medium
DATA_LOCATION = snapshot_download("midwestern-simulation/that-one-google-math-dataset", repo_type="dataset")

dataset = load_dataset("json", data_files=get_all_files(os.path.join(DATA_LOCATION, DATA_SPLIT)))
```