(output, illegal_value)
| 179 | |
| 180 | |
| 181 | def 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 | |
| 205 | def update_notes( |
no outgoing calls
no test coverage detected