-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheval_from_json.py
executable file
·41 lines (35 loc) · 1.09 KB
/
eval_from_json.py
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
37
38
39
40
41
import numpy as np
from eval_utils import _evaluate
def main():
if True:
root_output_path = "checkpoints/flow_v3_Quasar_T_a100/debug0_eulerstepsize0.001_can15_anchor0_samples20230622-00:41:12"
_evaluate(
_folder=root_output_path,
_mbr=True,
_eos="[SEP]",
_sos="[CLS]",
_sep="[SEP]",
_pad="[PAD]",
candidate_num=-1,
)
elif True:
with open(f"{root_output_path}_eval.txt", "w") as f:
f.write(f"hello kitty\n")
f.flush()
for _c in range(1, 16):
_dict = _evaluate(
_folder=root_output_path,
_mbr=True,
_eos="[SEP]",
_sos="[CLS]",
_sep="[SEP]",
_pad="[PAD]",
candidate_num=_c,
)
print(f"candddd result: {_dict}")
print(_dict)
f.write(str(_dict))
f.write("\n")
f.flush()
if __name__ == "__main__":
main()