MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / decode_result

Function decode_result

python-impl/evogit/api.py:181–202  ·  view source on GitHub ↗
(output, illegal_value)

Source from the content-addressed store, hash-verified

179
180
181def decode_result(output, illegal_value) -> Any:
182 if output["timeout"] is True:
183 performance_cost = illegal_value
184 time_cost = illegal_value
185 else:
186 try:
187 stdout = json.loads(output["stdout"])
188 if stdout["status"] == "finished":
189 performance_cost = stdout["fitness"]
190 time_cost = stdout["time_cost"]
191 else:
192 performance_cost = illegal_value
193 time_cost = illegal_value
194 except json.JSONDecodeError:
195 performance_cost = illegal_value
196 time_cost = illegal_value
197 except Exception as e:
198 logger.error(f"Unknown error occurred: {e}")
199 performance_cost = illegal_value
200 time_cost = illegal_value
201
202 return performance_cost, time_cost
203
204
205def update_notes(

Callers 1

migrate_from_other_hostsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected