Unverified Commit b536f067 authored by Nam D. Tran's avatar Nam D. Tran Committed by GitHub
Browse files

Fix Zeno Visualizer (#2227)



* fix: arguments data

* fix based on comment

* Update zeno_visualize.py

updated all output types

---------
Co-authored-by: default avatarBaber Abbasi <92168766+baberabb@users.noreply.github.com>
parent e050f3c9
...@@ -173,19 +173,19 @@ def generate_dataset( ...@@ -173,19 +173,19 @@ def generate_dataset(
instance = [""] * len(ids) instance = [""] * len(ids)
if config["output_type"] == "loglikelihood": if config["output_type"] == "loglikelihood":
instance = [x["arguments"][0][0] for x in data] instance = [x["arguments"]["gen_args_0"]["arg_0"] for x in data]
labels = [x["arguments"][0][1] for x in data] labels = [x["arguments"]["gen_args_0"]["arg_1"] for x in data]
elif config["output_type"] == "multiple_choice": elif config["output_type"] == "multiple_choice":
instance = [ instance = [
x["arguments"][0][0] x["arguments"]["gen_args_0"]["arg_0"]
+ "\n\n" + "\n\n"
+ "\n".join([f"- {y[1]}" for y in x["arguments"]]) + "\n".join([f"- {y[1]}" for y in x["arguments"]])
for x in data for x in data
] ]
elif config["output_type"] == "loglikelihood_rolling": elif config["output_type"] == "loglikelihood_rolling":
instance = [x["arguments"][0][0] for x in data] instance = [x["arguments"]["gen_args_0"]["arg_0"] for x in data]
elif config["output_type"] == "generate_until": elif config["output_type"] == "generate_until":
instance = [x["arguments"][0][0] for x in data] instance = [x["arguments"]["gen_args_0"]["arg_0"] for x in data]
return pd.DataFrame( return pd.DataFrame(
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment