danf0 commited on
Commit
b430aee
·
1 Parent(s): 899e164

Try dynamic value type

Browse files
Files changed (1) hide show
  1. vendiscore.py +4 -4
vendiscore.py CHANGED
@@ -71,15 +71,15 @@ Examples:
71
 
72
  def get_dtype(config_name):
73
  if config_name == "text":
74
- return datasets.Value("string")
75
  if config_name == "image":
76
- return datasets.Image
77
  elif config_name in ("X", "K"):
78
  return datasets.Array2D
79
  elif config_name == "default":
80
- return datasets.Value("string")
81
  else:
82
- return datasets.Value(config_name)
83
 
84
 
85
  @evaluate.utils.file_utils.add_start_docstrings(
 
71
 
72
  def get_dtype(config_name):
73
  if config_name == "text":
74
+ return datasets.Features({"samples": datasets.Value("string")})
75
  if config_name == "image":
76
+ return datasets.Features({"samples": datasets.Image})
77
  elif config_name in ("X", "K"):
78
  return datasets.Array2D
79
  elif config_name == "default":
80
+ return datasets.Features({"samples": datasets.Value("string")})
81
  else:
82
+ return datasets.Features({"samples": datasets.Value(config_name)})
83
 
84
 
85
  @evaluate.utils.file_utils.add_start_docstrings(