MCPcopy Create free account
hub / github.com/InternScience/InternAgent / save_final_info

Method save_final_info

tasks/AutoTTS/code/main.py:144–161  ·  view source on GitHub ↗
(self, accuracy: float)

Source from the content-addressed store, hash-verified

142 return entry
143
144 def save_final_info(self, accuracy: float) -> None:
145 final_info_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), "final_info.json")
146
147 final_info = {
148 self.dataset: {
149 "means": {
150 "accuracy": accuracy,
151 "prompt_tokens": get_token()[0],
152 "completion_tokens": get_token()[1],
153 "total_calls": get_call_count(),
154 }
155 }
156 }
157
158 with open(final_info_path, "w") as f:
159 json.dump(final_info, f, indent=4)
160
161 print(f"Results saved to {final_info_path}")
162
163 async def run(self) -> float:
164 # Run experiment and return accuracy

Callers 1

runMethod · 0.95

Calls 3

get_tokenFunction · 0.90
get_call_countFunction · 0.90
dumpMethod · 0.45

Tested by

no test coverage detected