Convert dataset to Parquet

#2
README.md CHANGED
@@ -1,3 +1,24 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
1
  ---
2
  license: apache-2.0
3
+ dataset_info:
4
+ features:
5
+ - name: moves
6
+ dtype: string
7
+ - name: length
8
+ dtype: int32
9
+ - name: result
10
+ dtype: string
11
+ - name: checkmate
12
+ dtype: bool
13
+ splits:
14
+ - name: train
15
+ num_bytes: 2229368511
16
+ num_examples: 4862922
17
+ download_size: 1458072313
18
+ dataset_size: 2229368511
19
+ configs:
20
+ - config_name: default
21
+ data_files:
22
+ - split: train
23
+ path: data/train-*
24
  ---
chess_games_caissabase.py DELETED
@@ -1,45 +0,0 @@
1
- """ Dataloader for Caissabase's chess games. """
2
-
3
- import os
4
- import csv
5
- import json
6
- import datasets
7
-
8
- # FILEPATH = "./chess_games_caissabase.jsonl"
9
- FILEPATH = "https://huggingface.co/datasets/mapama247/chess_games_caissabase/resolve/main/chess_games_caissabase.jsonl"
10
-
11
- class ChessGamesCaissabase(datasets.GeneratorBasedBuilder):
12
-
13
- def _info(self):
14
- features = datasets.Features(
15
- {
16
- "moves": datasets.Value("string"),
17
- "length": datasets.Value("int32"),
18
- "result": datasets.Value("string"),
19
- "checkmate": datasets.Value("bool"),
20
- }
21
- )
22
-
23
- return datasets.DatasetInfo(features=features)
24
-
25
- def _split_generators(self, dl_manager):
26
- return [
27
- datasets.SplitGenerator(
28
- name=datasets.Split.TRAIN,
29
- gen_kwargs={
30
- "filepath": FILEPATH,
31
- "split": "train",
32
- },
33
- ),
34
- ]
35
-
36
- def _generate_examples(self, filepath, split):
37
- with open(filepath, encoding="utf-8") as f:
38
- for key, row in enumerate(f):
39
- data = json.loads(row)
40
- yield key, {
41
- "moves": data["moves"],
42
- "length": data["length"],
43
- "result": data["result"],
44
- "checkmate": data["checkmate"],
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
chess_games_caissabase.jsonl → data/train-00000-of-00005.parquet RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c64d6a1e4da334083ea8211a29524bb0901fc62eeab09900684d7dc690fa25a1
3
- size 2471682634
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a39b75e21edb81d1a5acc0c1b1a9cc68efea9d5c2b5122e888741a0b092706d5
3
+ size 317828647
data/train-00001-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ab8bec44e6fd6f023573a60bc35c210c1139b79923869e83158202b48a68d6c
3
+ size 302793322
data/train-00002-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68b406f537483a72b95888391e08e1e83a28688d314780780bea83432be1ab34
3
+ size 288428302
data/train-00003-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9e116951e570c5252443489f5562d056c051b7cc8f984934f34353d4d932d51
3
+ size 279826475
data/train-00004-of-00005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed12280a9b1cc34b5046b149128e57909ea145e65736a7f79750f164cbf1ead2
3
+ size 269195567