Datasets:

Tasks:
Other
Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Tags:
License:
VictorSanh commited on
Commit
d4f54c6
1 Parent(s): 2b2a2db

fix load_cahced_task

Browse files
Files changed (1) hide show
  1. P3.py +4 -3
P3.py CHANGED
@@ -81,10 +81,11 @@ _DATA_PATH = "data"
81
  def load_cached_task(features_file, tfrecord, split):
82
  # # TODO(Victor): this info.*.json is actually done twice... -> factorize
83
  # with tf.io.gfile.GFile(os.path.join(cache_dir, f"info.{split}.json")) as f:
84
- # split_info = json.load(f)
85
- # features = split_info["features"]
86
  with tf.io.gfile.GFile(features_file) as f:
87
- features = json.load(f)
 
 
 
88
 
89
  # Use `FixedLenSequenceFeature` for sequences with variable length.
90
  def _feature_config(shape, dtype):
 
81
  def load_cached_task(features_file, tfrecord, split):
82
  # # TODO(Victor): this info.*.json is actually done twice... -> factorize
83
  # with tf.io.gfile.GFile(os.path.join(cache_dir, f"info.{split}.json")) as f:
 
 
84
  with tf.io.gfile.GFile(features_file) as f:
85
+ split_info = json.load(f)
86
+ features = split_info["features"]
87
+ split_info = json.load(f)
88
+ features = split_info["features"]
89
 
90
  # Use `FixedLenSequenceFeature` for sequences with variable length.
91
  def _feature_config(shape, dtype):