Skip to content
Snippets Groups Projects
Unverified Commit 67bf7897 authored by 罗崚骁(Lingxiao Luo)'s avatar 罗崚骁(Lingxiao Luo) Committed by GitHub
Browse files

Update legacy XLDST evaluation (#186)

* remove transformer cache dir

* process data

* fix "book" slots processing in MultiWOZ-zh SUMBT, update evaluation results #185

* Revert "process data"

This reverts commit d17602c23cccb482827d8892554f32eb69dde297.

* Revert "remove transformer cache dir"

This reverts commit 35873129eb8d45a5bebada63b4549de88b665873.
parent 06f53fd7
Branches
No related tags found
No related merge requests found
......@@ -204,9 +204,9 @@ evaluation of our pre-trained models are: (joint acc.)
| type | CrossWOZ-en | MultiWOZ-zh |
| ----- | ----------- | ----------- |
| val | 12.4% | 45.1% |
| test | 12.4% | 43.5% |
| human_val | 10.6% | 49.4% |
| val | 12.4% | 48.5% |
| test | 12.4% | 46.0% |
| human_val | 10.6% | 47.4% |
`human_val` option will make the model evaluate on the validation set translated by human.
......
......@@ -582,28 +582,20 @@ class SUMBTTracker(DST):
new_belief_state = copy.deepcopy(prev_state['belief_state'])
for state in pred_states:
domain, slot, value = state.split('-', 2)
if slot not in ['name', 'book']:
if domain not in new_belief_state:
if domain == 'bus':
continue
else:
raise Exception(
'Error: domain <{}> not in belief state'.format(domain))
# slot = REF_SYS_DA[domain.capitalize()].get(slot, slot)
assert 'semi' in new_belief_state[domain]
assert 'book' in new_belief_state[domain]
domain_dic = new_belief_state[domain]
if '预订' in slot:
assert slot.startswith('预订')
slot = slot[2:]
assert slot in domain_dic['book']
domain_dic = new_belief_state[domain]
if slot in domain_dic['semi']:
new_belief_state[domain]['semi'][slot] = value
# normalize_value(self.value_dict, domain, slot, value)
elif slot in domain_dic['book']:
new_belief_state[domain]['book'][slot] = value
elif slot.lower() in domain_dic['book']:
new_belief_state[domain]['book'][slot.lower()] = value
else:
with open('trade_tracker_unknown_slot.log', 'a+') as f:
f.write(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment