ezhang7423 commited on
Commit
fa1abc9
·
1 Parent(s): beb5a62
Files changed (1) hide show
  1. lichess_2023_janoct.py +4 -2
lichess_2023_janoct.py CHANGED
@@ -170,7 +170,7 @@ class Lichess2023JanOct(datasets.GeneratorBasedBuilder):
170
  def _info(self):
171
  features = datasets.Features(
172
  {
173
- "moves": datasets.Value("null"), # np array
174
  }
175
  )
176
  return datasets.DatasetInfo(
@@ -263,4 +263,6 @@ class Lichess2023JanOct(datasets.GeneratorBasedBuilder):
263
  # add np array
264
  out = full_block[:BLOCK_SIZE]
265
  full_block = ""
266
- yield np.array([TOKENIZER['stoi'][c] for c in out], dtype=np.uint8)
 
 
 
170
  def _info(self):
171
  features = datasets.Features(
172
  {
173
+ "moves": datasets.Sequence(datasets.Value("uint8")),
174
  }
175
  )
176
  return datasets.DatasetInfo(
 
263
  # add np array
264
  out = full_block[:BLOCK_SIZE]
265
  full_block = ""
266
+ _id = i
267
+ i += 1
268
+ yield _id, {'moves': np.array([TOKENIZER['stoi'][c] for c in out], dtype=np.uint8)}