nthngdy commited on
Commit
f8b29fe
·
1 Parent(s): 383c57e

Update openwebtext_split.py

Browse files
Files changed (1) hide show
  1. openwebtext_split.py +2 -2
openwebtext_split.py CHANGED
@@ -19,7 +19,6 @@ import os
19
  import re
20
  from itertools import chain
21
  import tarfile
22
- import lzma
23
 
24
  import datasets
25
 
@@ -56,7 +55,8 @@ def custom_iter_archive(path_or_buf, _filter=lambda x: True):
56
  if not file_path.endswith('xz'):
57
  continue
58
  file_obj = stream.extractfile(tarinfo)
59
- with lzma.LZMAFile(file_obj, 'rb') as inner_stream:
 
60
  for j, xzinfo in enumerate(inner_stream):
61
  print(type(xzinfo))
62
  yield xzinfo.name, xzinfo
 
19
  import re
20
  from itertools import chain
21
  import tarfile
 
22
 
23
  import datasets
24
 
 
55
  if not file_path.endswith('xz'):
56
  continue
57
  file_obj = stream.extractfile(tarinfo)
58
+ print(type(file_obj))
59
+ with tarfile.open(file_obj, 'rb') as inner_stream:
60
  for j, xzinfo in enumerate(inner_stream):
61
  print(type(xzinfo))
62
  yield xzinfo.name, xzinfo