lara-martin
commited on
Update FIREBALL.py
Browse files- FIREBALL.py +83 -54
FIREBALL.py
CHANGED
@@ -82,60 +82,89 @@ class NewDataset(datasets.GeneratorBasedBuilder):
|
|
82 |
DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
83 |
|
84 |
def _info(self):
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
'
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
'
|
106 |
-
'
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
'
|
120 |
-
'
|
121 |
-
'
|
122 |
-
'
|
123 |
-
'
|
124 |
-
'
|
125 |
-
'
|
126 |
-
'
|
127 |
-
'
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
return datasets.DatasetInfo(
|
140 |
# This is the description that will appear on the datasets page.
|
141 |
description=_DESCRIPTION,
|
|
|
82 |
DEFAULT_CONFIG_NAME = "first_domain" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
83 |
|
84 |
def _info(self):
|
85 |
+
|
86 |
+
features = datasets.Features(
|
87 |
+
{
|
88 |
+
"speaker_id": datasets.Value('int64'),
|
89 |
+
"before_utterances": datasets.Sequence(datasets.Value('string')),
|
90 |
+
'combat_state_before': datasets.Sequence(
|
91 |
+
{
|
92 |
+
'name': datasets.Value(dtype='string'),
|
93 |
+
'hp': datasets.Value(dtype='string'),
|
94 |
+
'class': datasets.Value(dtype='string'),
|
95 |
+
'race': datasets.Value(dtype='string'),
|
96 |
+
'attacks': datasets.Value(dtype='string'),
|
97 |
+
'spells': datasets.Value(dtype='string'),
|
98 |
+
'actions': datasets.Value(dtype='string'),
|
99 |
+
'effects': datasets.Value(dtype='string'),
|
100 |
+
'description': datasets.Value(dtype='string'),
|
101 |
+
'controller_id': datasets.Value(dtype='string')
|
102 |
+
}
|
103 |
+
), #list of dictionaries
|
104 |
+
'current_actor': {
|
105 |
+
'name': datasets.Value(dtype='string'),
|
106 |
+
'hp': datasets.Value(dtype='string'),
|
107 |
+
'class': datasets.Value(dtype='string'),
|
108 |
+
'race': datasets.Value(dtype='string'),
|
109 |
+
'attacks': datasets.Value(dtype='string'),
|
110 |
+
'spells': datasets.Value(dtype='string'),
|
111 |
+
'actions': datasets.Value(dtype='string'),
|
112 |
+
'effects': datasets.Value(dtype='string'),
|
113 |
+
'description': datasets.Value(dtype='string'),
|
114 |
+
'controller_id': datasets.Value(dtype='string')
|
115 |
+
}, #dictionary
|
116 |
+
'commands_norm': datasets.value('string'),
|
117 |
+
'automation_results': datasets.value('string'),
|
118 |
+
'caster_after': {
|
119 |
+
'name': datasets.Value(dtype='string'),
|
120 |
+
'hp': datasets.Value(dtype='string'),
|
121 |
+
'class': datasets.Value(dtype='string'),
|
122 |
+
'race': datasets.Value(dtype='string'),
|
123 |
+
'attacks': datasets.Value(dtype='string'),
|
124 |
+
'spells': datasets.Value(dtype='string'),
|
125 |
+
'actions': datasets.Value(dtype='string'),
|
126 |
+
'effects': datasets.Value(dtype='string'),
|
127 |
+
'description': datasets.Value(dtype='string'),
|
128 |
+
'controller_id': datasets.Value(dtype='string')
|
129 |
+
}, #dictionary
|
130 |
+
'targets_after': datasets.Sequence(
|
131 |
+
{
|
132 |
+
'name': datasets.Value(dtype='string'),
|
133 |
+
'hp': datasets.Value(dtype='string'),
|
134 |
+
'class': datasets.Value(dtype='string'),
|
135 |
+
'race': datasets.Value(dtype='string'),
|
136 |
+
'attacks': datasets.Value(dtype='string'),
|
137 |
+
'spells': datasets.Value(dtype='string'),
|
138 |
+
'actions': datasets.Value(dtype='string'),
|
139 |
+
'effects': datasets.Value(dtype='string'),
|
140 |
+
'description': datasets.Value(dtype='string'),
|
141 |
+
'controller_id': datasets.Value(dtype='string')
|
142 |
+
}
|
143 |
+
), #list of dictionaries
|
144 |
+
'combat_state_after': datasets.Sequence(
|
145 |
+
{
|
146 |
+
'name': datasets.Value(dtype='string'),
|
147 |
+
'hp': datasets.Value(dtype='string'),
|
148 |
+
'class': datasets.Value(dtype='string'),
|
149 |
+
'race': datasets.Value(dtype='string'),
|
150 |
+
'attacks': datasets.Value(dtype='string'),
|
151 |
+
'spells': datasets.Value(dtype='string'),
|
152 |
+
'actions': datasets.Value(dtype='string'),
|
153 |
+
'effects': datasets.Value(dtype='string'),
|
154 |
+
'description': datasets.Value(dtype='string'),
|
155 |
+
'controller_id': datasets.Value(dtype='string')
|
156 |
+
}
|
157 |
+
), #list of dictionaries
|
158 |
+
'after_utterances': datasets.Sequence(datasets.Value('string')),
|
159 |
+
'utterance_history': datasets.Sequence(datasets.Value('string')),
|
160 |
+
'before_idxs': datasets.Sequence(datasets.Value('int16')),
|
161 |
+
'before_state_idx': datasets.Value('int16'),
|
162 |
+
'command_idxs': datasets.Sequence(datasets.Value('int16')),
|
163 |
+
'after_state_idx': datasets.Value('int16'),
|
164 |
+
'after_idxs': datasets.Sequence(datasets.Value('int16')),
|
165 |
+
'embed_idxs': datasets.Sequence(datasets.Value('int16'))
|
166 |
+
}
|
167 |
+
)
|
168 |
return datasets.DatasetInfo(
|
169 |
# This is the description that will appear on the datasets page.
|
170 |
description=_DESCRIPTION,
|