clean up
Browse files- agro-nt-tasks.py +9 -38
agro-nt-tasks.py
CHANGED
@@ -71,22 +71,8 @@ _TASK_INFO = {'poly_a':{'type': 'binary', 'val_set':False},
|
|
71 |
'splicing':{'type': 'binary', 'val_set':False},
|
72 |
'lncrna':{'type': 'binary', 'val_set':False},
|
73 |
'promoter_strength': {'type': 'regression', 'val_set': True},
|
74 |
-
'gene_exp':{'type':'multi_regression','val_set':True,
|
75 |
-
|
76 |
-
{'arabidopsis_thaliana': 56,
|
77 |
-
'glycine_max': 14,
|
78 |
-
'zea_mays': 23,
|
79 |
-
'solanum_lycopersicum': 10,
|
80 |
-
'oryza_sativa': 7}},
|
81 |
-
'chromatin_access':{'type':'multi_label','val_set':True,
|
82 |
-
'num_labels':
|
83 |
-
{'arabidopis_thaliana': 19,
|
84 |
-
'sorghum_bicolor': 14,
|
85 |
-
'oryza_sativa_ZS97_RS2': 15,
|
86 |
-
'oryza_sativa_MH63_RS2': 15,
|
87 |
-
'zea_mays': 19,
|
88 |
-
'brachypodium_distachyon': 9,
|
89 |
-
'setaria_italica': 9}}
|
90 |
}
|
91 |
|
92 |
class AgroNtTasksConfig(datasets.BuilderConfig):
|
@@ -122,32 +108,17 @@ class AgroNtTasks(datasets.GeneratorBasedBuilder):
|
|
122 |
|
123 |
def _info(self):
|
124 |
|
|
|
|
|
|
|
125 |
if self.config.task_type == 'binary':
|
126 |
-
|
127 |
-
{
|
128 |
-
"sequence": datasets.Value("string"),
|
129 |
-
"name": datasets.Value("string"),
|
130 |
-
"label": datasets.Value("int8"),
|
131 |
-
}
|
132 |
-
)
|
133 |
elif self.config.task_type == 'regression':
|
134 |
-
|
135 |
-
{
|
136 |
-
"sequence": datasets.Value("string"),
|
137 |
-
"name": datasets.Value("string"),
|
138 |
-
"label": datasets.Value("float32"),
|
139 |
-
}
|
140 |
-
)
|
141 |
-
|
142 |
elif self.config.task_type == 'multi_regression':
|
|
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
features = datasets.Features({
|
147 |
-
"sequence": datasets.Value("string"),
|
148 |
-
"name": datasets.Value("string"),
|
149 |
-
"labels": [datasets.Value("float32")]})
|
150 |
-
|
151 |
|
152 |
return datasets.DatasetInfo(
|
153 |
# This is the description that will appear on the datasets page.
|
|
|
71 |
'splicing':{'type': 'binary', 'val_set':False},
|
72 |
'lncrna':{'type': 'binary', 'val_set':False},
|
73 |
'promoter_strength': {'type': 'regression', 'val_set': True},
|
74 |
+
'gene_exp':{'type':'multi_regression','val_set':True},
|
75 |
+
'chromatin_access':{'type':'multi_label','val_set':True}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
|
78 |
class AgroNtTasksConfig(datasets.BuilderConfig):
|
|
|
108 |
|
109 |
def _info(self):
|
110 |
|
111 |
+
feature_dit = {"sequence": datasets.Value("string"),
|
112 |
+
"name": datasets.Value("string")}
|
113 |
+
|
114 |
if self.config.task_type == 'binary':
|
115 |
+
feature_dit["label"] = datasets.Value("int8")
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
elif self.config.task_type == 'regression':
|
117 |
+
feature_dit["label"] = datasets.Value("float32")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
elif self.config.task_type == 'multi_regression':
|
119 |
+
feature_dit['labels'] = [datasets.Value("float32")]
|
120 |
|
121 |
+
features = datasets.Features(feature_dit)
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
return datasets.DatasetInfo(
|
124 |
# This is the description that will appear on the datasets page.
|