danf0 commited on
Commit
40df7c3
1 Parent(s): 607b435

Try dynamic typing

Browse files
Files changed (1) hide show
  1. vendiscore.py +10 -7
vendiscore.py CHANGED
@@ -86,16 +86,19 @@ def get_features(config_name):
86
  if config_name in ("text", "default"):
87
  return datasets.Features({"samples": datasets.Value("string")})
88
  if config_name == "image":
89
- datasets.Features({"samples": datasets.Image})
 
 
 
 
 
 
 
 
 
90
  return [
91
  datasets.Features({"samples": datasets.Value("int32")}),
92
- datasets.Features(
93
- {"samples": datasets.Sequence(datasets.Value("int32"))}
94
- ),
95
  datasets.Features({"samples": datasets.Value("float")}),
96
- datasets.Features(
97
- {"samples": datasets.Sequence(datasets.Value("float"))}
98
- ),
99
  datasets.Features({"samples": datasets.Array2D}),
100
  ]
101
 
 
86
  if config_name in ("text", "default"):
87
  return datasets.Features({"samples": datasets.Value("string")})
88
  if config_name == "image":
89
+ return datasets.Features({"samples": datasets.Image})
90
+ if config_name in ("K", "X"):
91
+ return [
92
+ datasets.Features(
93
+ {"samples": datasets.Sequence(datasets.Value("int32"))}
94
+ ),
95
+ datasets.Features(
96
+ {"samples": datasets.Sequence(datasets.Value("float"))}
97
+ ),
98
+ ]
99
  return [
100
  datasets.Features({"samples": datasets.Value("int32")}),
 
 
 
101
  datasets.Features({"samples": datasets.Value("float")}),
 
 
 
102
  datasets.Features({"samples": datasets.Array2D}),
103
  ]
104