IlyaGusev commited on
Commit
0d33974
1 Parent(s): 80b4d9f

Split into several files

Browse files
.gitattributes CHANGED
@@ -53,3 +53,23 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpeg filter=lfs diff=lfs merge=lfs -text
54
  *.webp filter=lfs diff=lfs merge=lfs -text
55
  pikabu.jsonl.zst filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  *.jpeg filter=lfs diff=lfs merge=lfs -text
54
  *.webp filter=lfs diff=lfs merge=lfs -text
55
  pikabu.jsonl.zst filter=lfs diff=lfs merge=lfs -text
56
+ 08.jsonl.zst filter=lfs diff=lfs merge=lfs -text
57
+ 09.jsonl.zst filter=lfs diff=lfs merge=lfs -text
58
+ 13.jsonl.zst filter=lfs diff=lfs merge=lfs -text
59
+ 16.jsonl.zst filter=lfs diff=lfs merge=lfs -text
60
+ 06.jsonl.zst filter=lfs diff=lfs merge=lfs -text
61
+ 03.jsonl.zst filter=lfs diff=lfs merge=lfs -text
62
+ 05.jsonl.zst filter=lfs diff=lfs merge=lfs -text
63
+ 10.jsonl.zst filter=lfs diff=lfs merge=lfs -text
64
+ 11.jsonl.zst filter=lfs diff=lfs merge=lfs -text
65
+ 12.jsonl.zst filter=lfs diff=lfs merge=lfs -text
66
+ 18.jsonl.zst filter=lfs diff=lfs merge=lfs -text
67
+ 02.jsonl.zst filter=lfs diff=lfs merge=lfs -text
68
+ 01.jsonl.zst filter=lfs diff=lfs merge=lfs -text
69
+ 04.jsonl.zst filter=lfs diff=lfs merge=lfs -text
70
+ 14.jsonl.zst filter=lfs diff=lfs merge=lfs -text
71
+ 17.jsonl.zst filter=lfs diff=lfs merge=lfs -text
72
+ 00.jsonl.zst filter=lfs diff=lfs merge=lfs -text
73
+ 15.jsonl.zst filter=lfs diff=lfs merge=lfs -text
74
+ 19.jsonl.zst filter=lfs diff=lfs merge=lfs -text
75
+ 07.jsonl.zst filter=lfs diff=lfs merge=lfs -text
pikabu.jsonl.zst → 00.jsonl.zst RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:91e2f8a3c408e0cf14039488cada9f5f9b7a31b204240d9f2a134ba9d597dd16
3
- size 20197306953
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fff97738eaddbcdd902ebc4856b22994cb715c8b5620c422384e071896ee7c3
3
+ size 1008284726
01.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:150b6244bf704cef921f5f69c1ae9af7374d84e13616a8a01e49cab47fee9923
3
+ size 1028821490
02.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0eb2b3e5dd953c7110767e89d5be7e5566551e575f01c2679a3ef52ca8020184
3
+ size 1035107019
03.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3efa473dfdc7b63587fbf78a292cd396da91be3211c260fa6b4f001543d0a498
3
+ size 1025713623
04.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0938cd97540e1f85120918e69833684f74b714b8e9f3444b8bcc2f7b713cf58a
3
+ size 1011739151
05.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07a820d01ec97c81e4ab0ddea0f7cef380f133dc223ad0405ecc3ba83cd10477
3
+ size 1010065067
06.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:60f34ee83b844b5df5632ba4b2a0f5fc5bc2ea5fcaed81b931593a2922af001f
3
+ size 1012849438
07.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13146a6b03b58e1c2938b77a067203de8c2c84b5700d0b8dda2ccc0ffe97f8c5
3
+ size 1014427581
08.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:faeedc30517626cf6bfa9ea09adca3d1c2eb34226d18c332080950c8a0f008ee
3
+ size 1005532168
09.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:47c97866f708cb63e7fe1dbe4ddaca028920e877487ce03255bf15470c823b73
3
+ size 1000877927
10.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dea16b8125635912db85bcdc25ee98938f0244bd005dae7d7afb2b5d5ceabeda
3
+ size 999193734
11.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13a7ecf874c444e39c8e59912d70c41b345083599bf17185d5618269934b5478
3
+ size 995348301
12.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a55e696725f90db00d912a624a517b744d171637b58b0ef74790269314e69eb5
3
+ size 991410838
13.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b10c750bfb933cbd930b20047e29f07c383d3feaea63b309024627487a93a5c
3
+ size 1001624809
14.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7169c612330ff96ab708d0d3163dcc7c4ff4f817b41dfb38f0924479a42c602b
3
+ size 996194218
15.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df5e62fd0128b32e04e9f3a1594b6294ce963c2f08d50dd3c6a10993eaf2fadd
3
+ size 1010440139
16.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:667205aa99208fa081d6662ce22d2c1b6efc63654436b076cf26553961b23889
3
+ size 1009957847
17.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4312f762192e9583c6275891c71009b67e5e80db4257e93c1e02ed9b0f04918a
3
+ size 1011101072
18.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d54ec5dcbddebb52672d68cafcb15574746ac4604ea07dd55d7738b1176e524
3
+ size 1019896887
19.jsonl.zst ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b3917a368db9c140d7c6d0c271dd43205e9ed3c4fe13fbb14cace48afd9e6c6
3
+ size 1008267654
README.md CHANGED
@@ -57,6 +57,6 @@ dataset_info:
57
  - name: train
58
  num_bytes: 96105803658
59
  num_examples: 6907622
60
- download_size: 20197306953
61
  dataset_size: 96105803658
62
  ---
 
57
  - name: train
58
  num_bytes: 96105803658
59
  num_examples: 6907622
60
+ download_size: 20196853689
61
  dataset_size: 96105803658
62
  ---
pikabu.py CHANGED
@@ -34,12 +34,12 @@ except ImportError:
34
  def parse_json(x):
35
  return json.loads(x)
36
 
37
-
38
  _DESCRIPTION = "Pikabu dataset"
39
- _URL = "pikabu.jsonl.zst"
 
40
 
41
 
42
- class YandexQFullDataset(datasets.GeneratorBasedBuilder):
43
  VERSION = datasets.Version("0.0.1")
44
 
45
  BUILDER_CONFIGS = [
@@ -87,15 +87,16 @@ class YandexQFullDataset(datasets.GeneratorBasedBuilder):
87
  )
88
 
89
  def _split_generators(self, dl_manager):
90
- downloaded_file = dl_manager.download(_URL)
91
  return [
92
- datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"path": downloaded_file}),
93
  ]
94
 
95
- def _generate_examples(self, path):
96
- with open(path, "rb") as f:
97
- cctx = zstandard.ZstdDecompressor()
98
- reader_stream = io.BufferedReader(cctx.stream_reader(f))
99
- reader = jsonlines.Reader(reader_stream, loads=parse_json)
100
- for id_, item in enumerate(reader):
101
- yield id_, item
 
 
34
  def parse_json(x):
35
  return json.loads(x)
36
 
 
37
  _DESCRIPTION = "Pikabu dataset"
38
+ _TRAIN_SPLITS = 20
39
+ _URLS = ["{}.jsonl.zst".format(str(i).zfill(2)) for i in range(_TRAIN_SPLITS)]
40
 
41
 
42
+ class PikabuDataset(datasets.GeneratorBasedBuilder):
43
  VERSION = datasets.Version("0.0.1")
44
 
45
  BUILDER_CONFIGS = [
 
87
  )
88
 
89
  def _split_generators(self, dl_manager):
90
+ downloaded_files = dl_manager.download(_URLS)
91
  return [
92
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"paths": downloaded_files}),
93
  ]
94
 
95
+ def _generate_examples(self, paths):
96
+ for path in paths:
97
+ with open(path, "rb") as f:
98
+ cctx = zstandard.ZstdDecompressor()
99
+ reader_stream = io.BufferedReader(cctx.stream_reader(f))
100
+ reader = jsonlines.Reader(reader_stream, loads=parse_json)
101
+ for id_, item in enumerate(reader):
102
+ yield id_, item