lara-martin commited on
Commit
1aa7123
·
verified ·
1 Parent(s): bdcb0c3

Update FIREBALL.py

Browse files
Files changed (1) hide show
  1. FIREBALL.py +64 -63
FIREBALL.py CHANGED
@@ -21,6 +21,7 @@ import jsonlines
21
  import os
22
 
23
  import datasets
 
24
 
25
 
26
  # TODO: Add BibTeX citation
@@ -78,86 +79,86 @@ class Fireball(datasets.GeneratorBasedBuilder):
78
 
79
  def _info(self):
80
 
81
- features = datasets.Features(
82
  {
83
- # "speaker_id": datasets.Value('int64'),
84
- "before_utterances": datasets.Sequence(datasets.Value('string')),
85
  'combat_state_before': datasets.Sequence(
86
  {
87
- 'name': datasets.Value(dtype='string'),
88
- 'hp': datasets.Value(dtype='string'),
89
- 'class': datasets.Value(dtype='string'),
90
- 'race': datasets.Value(dtype='string'),
91
- 'attacks': datasets.Value(dtype='string'),
92
- 'spells': datasets.Value(dtype='string'),
93
- 'actions': datasets.Value(dtype='string'),
94
- 'effects': datasets.Value(dtype='string'),
95
- 'description': datasets.Value(dtype='string'),
96
- 'controller_id': datasets.Value(dtype='string')
97
  }
98
  ), #list of dictionaries
99
  # 'current_actor': {
100
- # 'name': datasets.Value(dtype='string'),
101
- # 'hp': datasets.Value(dtype='string'),
102
- # 'class': datasets.Value(dtype='string'),
103
- # 'race': datasets.Value(dtype='string'),
104
- # 'attacks': datasets.Value(dtype='string'),
105
- # 'spells': datasets.Value(dtype='string'),
106
- # 'actions': datasets.Value(dtype='string'),
107
- # 'effects': datasets.Value(dtype='string'),
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(
 
21
  import os
22
 
23
  import datasets
24
+ from datasets import Features
25
 
26
 
27
  # TODO: Add BibTeX citation
 
79
 
80
  def _info(self):
81
 
82
+ features = Features(
83
  {
84
+ # "speaker_id": Value('int64'),
85
+ "before_utterances": datasets.Sequence(Value('string')),
86
  'combat_state_before': datasets.Sequence(
87
  {
88
+ 'name': Value(dtype='string'),
89
+ 'hp': Value(dtype='string'),
90
+ 'class': Value(dtype='string'),
91
+ 'race': Value(dtype='string'),
92
+ 'attacks': Value(dtype='string'),
93
+ 'spells': Value(dtype='string'),
94
+ 'actions': Value(dtype='string'),
95
+ 'effects': Value(dtype='string'),
96
+ 'description': Value(dtype='string'),
97
+ 'controller_id': Value(dtype='string')
98
  }
99
  ), #list of dictionaries
100
  # 'current_actor': {
101
+ # 'name': Value(dtype='string'),
102
+ # 'hp': Value(dtype='string'),
103
+ # 'class': Value(dtype='string'),
104
+ # 'race': Value(dtype='string'),
105
+ # 'attacks': Value(dtype='string'),
106
+ # 'spells': Value(dtype='string'),
107
+ # 'actions': Value(dtype='string'),
108
+ # 'effects': Value(dtype='string'),
109
+ # 'description': Value(dtype='string'),
110
+ # 'controller_id': Value(dtype='string')
111
  # }, #dictionary
112
+ 'commands_norm': Value('string'),
113
+ 'automation_results': Value('string'),
114
  'caster_after': {
115
+ 'name': Value(dtype='string'),
116
+ 'hp': Value(dtype='string'),
117
+ 'class': Value(dtype='string'),
118
+ 'race': Value(dtype='string'),
119
+ 'attacks': Value(dtype='string'),
120
+ 'spells': Value(dtype='string'),
121
+ 'actions': Value(dtype='string'),
122
+ 'effects': Value(dtype='string'),
123
+ 'description': Value(dtype='string'),
124
+ 'controller_id': Value(dtype='string')
125
  }, #dictionary
126
  'targets_after': datasets.Sequence(
127
  {
128
+ 'name': Value(dtype='string'),
129
+ 'hp': Value(dtype='string'),
130
+ 'class': Value(dtype='string'),
131
+ 'race': Value(dtype='string'),
132
+ 'attacks': Value(dtype='string'),
133
+ 'spells': Value(dtype='string'),
134
+ 'actions': Value(dtype='string'),
135
+ 'effects': Value(dtype='string'),
136
+ 'description': Value(dtype='string'),
137
+ 'controller_id': Value(dtype='string')
138
  }
139
  ), #list of dictionaries
140
  'combat_state_after': datasets.Sequence(
141
  {
142
+ 'name': Value(dtype='string'),
143
+ 'hp': Value(dtype='string'),
144
+ 'class': Value(dtype='string'),
145
+ 'race': Value(dtype='string'),
146
+ 'attacks': Value(dtype='string'),
147
+ 'spells': Value(dtype='string'),
148
+ 'actions': Value(dtype='string'),
149
+ 'effects': Value(dtype='string'),
150
+ 'description': Value(dtype='string'),
151
+ 'controller_id': Value(dtype='string')
152
  }
153
  ), #list of dictionaries
154
+ 'after_utterances': datasets.Sequence(Value('string')),
155
+ 'utterance_history': datasets.Sequence(Value('string')),
156
+ 'before_idxs': datasets.Sequence(Value('int16')),
157
+ 'before_state_idx': Value('int16'),
158
+ 'command_idxs': datasets.Sequence(Value('int16')),
159
+ 'after_state_idx': Value('int16'),
160
+ 'after_idxs': datasets.Sequence(Value('int16')),
161
+ 'embed_idxs': datasets.Sequence(Value('int16'))
162
  }
163
  )
164
  return datasets.DatasetInfo(