mapama247 commited on
Commit
6538dbb
1 Parent(s): b18e638

Delete loading script

Browse files
Files changed (1) hide show
  1. chess_games_caissabase.py +0 -45
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
- }