lara-martin commited on
Commit
1e93dec
·
verified ·
1 Parent(s): 37f6b97

Update FIREBALL.py

Browse files
Files changed (1) hide show
  1. FIREBALL.py +63 -63
FIREBALL.py CHANGED
@@ -108,56 +108,56 @@ class Fireball(datasets.GeneratorBasedBuilder):
108
  'description': datasets.Value(dtype='string'),
109
  'controller_id': datasets.Value(dtype='string')
110
  }, #dictionary
111
- # 'commands_norm': datasets.value('string'),
112
- # 'automation_results': datasets.value('string'),
113
- # 'caster_after': {
114
- # 'name': datasets.Value(dtype='string'),
115
- # 'hp': datasets.Value(dtype='string'),
116
- # 'class': datasets.Value(dtype='string'),
117
- # 'race': datasets.Value(dtype='string'),
118
- # 'attacks': datasets.Value(dtype='string'),
119
- # 'spells': datasets.Value(dtype='string'),
120
- # 'actions': datasets.Value(dtype='string'),
121
- # 'effects': datasets.Value(dtype='string'),
122
- # 'description': datasets.Value(dtype='string'),
123
- # 'controller_id': datasets.Value(dtype='string')
124
- # }, #dictionary
125
- # 'targets_after': datasets.Sequence(
126
- # {
127
- # 'name': datasets.Value(dtype='string'),
128
- # 'hp': datasets.Value(dtype='string'),
129
- # 'class': datasets.Value(dtype='string'),
130
- # 'race': datasets.Value(dtype='string'),
131
- # 'attacks': datasets.Value(dtype='string'),
132
- # 'spells': datasets.Value(dtype='string'),
133
- # 'actions': datasets.Value(dtype='string'),
134
- # 'effects': datasets.Value(dtype='string'),
135
- # 'description': datasets.Value(dtype='string'),
136
- # 'controller_id': datasets.Value(dtype='string')
137
- # }
138
- # ), #list of dictionaries
139
- # 'combat_state_after': datasets.Sequence(
140
- # {
141
- # 'name': datasets.Value(dtype='string'),
142
- # 'hp': datasets.Value(dtype='string'),
143
- # 'class': datasets.Value(dtype='string'),
144
- # 'race': datasets.Value(dtype='string'),
145
- # 'attacks': datasets.Value(dtype='string'),
146
- # 'spells': datasets.Value(dtype='string'),
147
- # 'actions': datasets.Value(dtype='string'),
148
- # 'effects': datasets.Value(dtype='string'),
149
- # 'description': datasets.Value(dtype='string'),
150
- # 'controller_id': datasets.Value(dtype='string')
151
- # }
152
- # ), #list of dictionaries
153
- # 'after_utterances': datasets.Sequence(datasets.Value('string')),
154
- # 'utterance_history': datasets.Sequence(datasets.Value('string')),
155
- # 'before_idxs': datasets.Sequence(datasets.Value('int16')),
156
- # 'before_state_idx': datasets.Value('int16'),
157
- # 'command_idxs': datasets.Sequence(datasets.Value('int16')),
158
- # 'after_state_idx': datasets.Value('int16'),
159
- # 'after_idxs': datasets.Sequence(datasets.Value('int16')),
160
- # 'embed_idxs': datasets.Sequence(datasets.Value('int16'))
161
  }
162
  )
163
  return datasets.DatasetInfo(
@@ -214,18 +214,18 @@ class Fireball(datasets.GeneratorBasedBuilder):
214
  "before_utterances": data["before_utterances"],
215
  'combat_state_before': data['combat_state_before'],
216
  'current_actor': data["current_actor"],
217
- # 'commands_norm': data['commands_norm'],
218
- # 'automation_results': data['automation_results'],
219
- # 'caster_after': data['caster_after'],
220
- # 'targets_after': data['targets_after'],
221
- # 'combat_state_after': data['combat_state_after'],
222
- # 'after_utterances': data['after_utterances'],
223
- # 'utterance_history': data['utterance_history'],
224
- # 'before_idxs': data['before_idxs'],
225
- # 'before_state_idx': data['before_state_idx'],
226
- # 'command_idxs': data['command_idxs'],
227
- # 'after_state_idx': data['after_state_idx'],
228
- # 'after_idxs': data['after_idxs'],
229
- # 'embed_idxs': data['embed_idxs']
230
  }
231
  key+=1
 
108
  'description': datasets.Value(dtype='string'),
109
  'controller_id': datasets.Value(dtype='string')
110
  }, #dictionary
111
+ 'commands_norm': datasets.value('string'),
112
+ 'automation_results': datasets.value('string'),
113
+ 'caster_after': {
114
+ 'name': datasets.Value(dtype='string'),
115
+ 'hp': datasets.Value(dtype='string'),
116
+ 'class': datasets.Value(dtype='string'),
117
+ 'race': datasets.Value(dtype='string'),
118
+ 'attacks': datasets.Value(dtype='string'),
119
+ 'spells': datasets.Value(dtype='string'),
120
+ 'actions': datasets.Value(dtype='string'),
121
+ 'effects': datasets.Value(dtype='string'),
122
+ 'description': datasets.Value(dtype='string'),
123
+ 'controller_id': datasets.Value(dtype='string')
124
+ }, #dictionary
125
+ 'targets_after': datasets.Sequence(
126
+ {
127
+ 'name': datasets.Value(dtype='string'),
128
+ 'hp': datasets.Value(dtype='string'),
129
+ 'class': datasets.Value(dtype='string'),
130
+ 'race': datasets.Value(dtype='string'),
131
+ 'attacks': datasets.Value(dtype='string'),
132
+ 'spells': datasets.Value(dtype='string'),
133
+ 'actions': datasets.Value(dtype='string'),
134
+ 'effects': datasets.Value(dtype='string'),
135
+ 'description': datasets.Value(dtype='string'),
136
+ 'controller_id': datasets.Value(dtype='string')
137
+ }
138
+ ), #list of dictionaries
139
+ 'combat_state_after': datasets.Sequence(
140
+ {
141
+ 'name': datasets.Value(dtype='string'),
142
+ 'hp': datasets.Value(dtype='string'),
143
+ 'class': datasets.Value(dtype='string'),
144
+ 'race': datasets.Value(dtype='string'),
145
+ 'attacks': datasets.Value(dtype='string'),
146
+ 'spells': datasets.Value(dtype='string'),
147
+ 'actions': datasets.Value(dtype='string'),
148
+ 'effects': datasets.Value(dtype='string'),
149
+ 'description': datasets.Value(dtype='string'),
150
+ 'controller_id': datasets.Value(dtype='string')
151
+ }
152
+ ), #list of dictionaries
153
+ 'after_utterances': datasets.Sequence(datasets.Value('string')),
154
+ 'utterance_history': datasets.Sequence(datasets.Value('string')),
155
+ 'before_idxs': datasets.Sequence(datasets.Value('int16')),
156
+ 'before_state_idx': datasets.Value('int16'),
157
+ 'command_idxs': datasets.Sequence(datasets.Value('int16')),
158
+ 'after_state_idx': datasets.Value('int16'),
159
+ 'after_idxs': datasets.Sequence(datasets.Value('int16')),
160
+ 'embed_idxs': datasets.Sequence(datasets.Value('int16'))
161
  }
162
  )
163
  return datasets.DatasetInfo(
 
214
  "before_utterances": data["before_utterances"],
215
  'combat_state_before': data['combat_state_before'],
216
  'current_actor': data["current_actor"],
217
+ 'commands_norm': data['commands_norm'],
218
+ 'automation_results': data['automation_results'],
219
+ 'caster_after': data['caster_after'],
220
+ 'targets_after': data['targets_after'],
221
+ 'combat_state_after': data['combat_state_after'],
222
+ 'after_utterances': data['after_utterances'],
223
+ 'utterance_history': data['utterance_history'],
224
+ 'before_idxs': data['before_idxs'],
225
+ 'before_state_idx': data['before_state_idx'],
226
+ 'command_idxs': data['command_idxs'],
227
+ 'after_state_idx': data['after_state_idx'],
228
+ 'after_idxs': data['after_idxs'],
229
+ 'embed_idxs': data['embed_idxs']
230
  }
231
  key+=1