-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevaluate_graphs.bash
36 lines (32 loc) · 1.63 KB
/
evaluate_graphs.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
PATH_DATASET="data/spokenwoz"
PATH_CONVERSATIONS="$PATH_DATASET/trajectories.single_domain.json"
PATH_OUTPUT="output"
models=(
# Dialog2Flow models
"sergioburdisso/dialog2flow-single-bert-base" # D2F_single
"sergioburdisso/dialog2flow-joint-bert-base" # D2F_joint
# "models/d2f-hard_single" # D2F-Hard_single ------> (UNCOMMENT line if already unzipped)
# "models/d2f-hard_joint" # D2F-Hard_joint ------> (UNCOMMENT line if already unzipped)
# Baselines
"aws-ai/dse-bert-base" # DSE
"sergioburdisso/space-2" # SPACE-2
"microsoft/DialoGPT-medium" # DialoGPT
"bert-base-uncased" # BERT
"openai/text-embedding-3-large" # OpenAI
"all-mpnet-base-v2" # Sentence-BERT
"sentence-transformers/gtr-t5-base" # GTR-T5
# "models/todbert_sbd" # SBD-BERT ------> (UNCOMMENT line if already unzipped)
"sentence-transformers/average_word_embeddings_glove.840B.300d" # GloVe
"TODBERT/TOD-BERT-JNT-V1" # TOD-BERT
)
# 1) Generate the action trajectories for each model, by clustering dialog utterances
for model in "${models[@]}"; do
python extract_trajectories.py -o "$PATH_OUTPUT/" -m "$model" -i "$PATH_CONVERSATIONS"
done
# 2) Generate the ground truth / reference graphs (one graph dormain)
python build_graph.py -i "$PATH_DATASET/trajectories.single_domain.json" -o "$PATH_OUTPUT/graph/ground_truth" -te 0.02
# 3) Generate the graphs using the generated trajectories (one graph domain)
python build_graph.py -i "$PATH_OUTPUT" -o "$PATH_OUTPUT/graph" -te 0.02
# 4) Evaluate reference graph vs. generated graph for each domain
python evaluate_graph.py -i "$PATH_OUTPUT/graph" -gt "$PATH_OUTPUT/graph/ground_truth"