christopher commited on
Commit
f314fd4
·
verified ·
1 Parent(s): f0976ba

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -2
README.md CHANGED
@@ -36,13 +36,35 @@ tags:
36
  <!-- Provide a quick summary of the dataset. -->
37
  ## Dataset Description
38
 
39
- **83,025,738 chess positions** evaluated with Stockfish at various depths and node count. Produced by, and for, the [Lichess analysis board](https://lichess.org/analysis), running various flavours of Stockfish within user browsers. This version of the dataset is a de-normalized version of [the original dataset](https://database.lichess.org/#evals) and contains **227,340,112 rows**.
40
 
 
41
 
42
 
43
  ### Dataset Creation
44
- WIP
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  ### Dataset Usage
47
 
48
  Using the `datasets` library:
 
36
  <!-- Provide a quick summary of the dataset. -->
37
  ## Dataset Description
38
 
39
+ **100,731,099 chess positions** evaluated with Stockfish at various depths and node count. Produced by, and for, the [Lichess analysis board](https://lichess.org/analysis), running various flavours of Stockfish within user browsers. This version of the dataset is a de-normalized version of [the original dataset](https://database.lichess.org/#evals) and contains **276,985,422 rows**.
40
 
41
+ This dataset is updated monthly, and was last updated on October 15th, 2024.
42
 
43
 
44
  ### Dataset Creation
 
45
 
46
+ ```python
47
+ from datasets import load_dataset
48
+
49
+ dset = load_dataset("json", data_files="lichess_db_eval.jsonl", split="train")
50
+
51
+ def batch_explode_rows(batch):
52
+ exploded = {"fen": [], "line": [], "depth": [], "knodes": [], "cp": [], "mate": []}
53
+ for fen, evals in zip(batch["fen"], batch["evals"]):
54
+ for eval_ in evals:
55
+ for pv in eval_["pvs"]:
56
+ exploded["fen"].append(fen)
57
+ exploded["line"].append(pv["line"])
58
+ exploded["depth"].append(eval_["depth"])
59
+ exploded["knodes"].append(eval_["knodes"])
60
+ exploded["cp"].append(pv["cp"])
61
+ exploded["mate"].append(pv["mate"])
62
+ return exploded
63
+
64
+ dset = dset.map(batch_explode_rows, batched=True, batch_size=64, num_proc=12, remove_columns=dset.column_names)
65
+
66
+ dset.push_to_hub("Lichess/chess-evaluations")
67
+ ```
68
  ### Dataset Usage
69
 
70
  Using the `datasets` library: