Skip to content

Commit 9ded7d1

Browse files
committed
Workflow: Enhance metric parsing and increase evaluation timeout
1 parent 114abc3 commit 9ded7d1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pylib/default_graph.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,11 @@
284284
},
285285
{
286286
"config": {
287-
"command": "cd {current_exp_path} && {eval_cmd} > eval_out.txt 2>&1; cat eval_out.txt",
287+
"command": "cd {current_exp_path} && ( {eval_cmd} ) > eval_out.txt 2>&1; cat eval_out.txt",
288288
"output_vars": [
289289
"test_output"
290290
],
291-
"timeout": 12000
291+
"timeout": 86400
292292
},
293293
"id": "step4_eval",
294294
"label": "4. Run Evaluator",
@@ -300,7 +300,7 @@
300300
},
301301
{
302302
"config": {
303-
"code": "\nimport re\nlogger.log(\"\ud83d\udc1b DEBUG: Step 4.5 Parse Metric Started\")\noutput = context.get('test_output', '')\nlogger.log(f'\ud83d\udc1b DEBUG: test_output length: {len(output)}')\nif len(output) < 200: logger.log(f'\ud83d\udc1b DEBUG: test_output content: {output}')\n\nmetric = None\ntry:\n match = re.search(r\"Best metric:\\s*([-\\d\\.]+)\", output)\n if match:\n metric = float(match.group(1))\n logger.log(f'\ud83d\udc1b DEBUG: Matched Best metric: {metric}')\n else:\n logger.log(\"\ud83d\udc1b DEBUG: No 'Best metric' found.\")\nexcept Exception as e:\n logger.log(f'\ud83d\udc1b DEBUG: Regex Error: {e}')\n\nif metric is None:\n logger.log(\"\u26a0\ufe0f Could not parse metric. Setting current_metric to None.\")\n context['current_metric'] = None # Explicitly set to None if not found\nelse:\n context['current_metric'] = metric\n logger.log(f'\u2705 Metric Parsed and Set: {metric}')\n"
303+
"code": "\nimport re\nlogger.log(\"\ud83d\udc1b DEBUG: Step 4.5 Parse Metric Started\")\noutput = context.get('test_output', '')\nlogger.log(f'\ud83d\udc1b DEBUG: test_output length: {len(output)}')\nif len(output) < 200: logger.log(f'\ud83d\udc1b DEBUG: test_output content: {output}')\n\nmetric = None\ntry:\n match = re.search(r\"Best metric.*?:\\s*([-\\d\\.]+)\", output)\n if match:\n metric = float(match.group(1))\n logger.log(f'\ud83d\udc1b DEBUG: Matched Best metric: {metric}')\n else:\n logger.log(\"\ud83d\udc1b DEBUG: No 'Best metric' found.\")\nexcept Exception as e:\n logger.log(f'\ud83d\udc1b DEBUG: Regex Error: {e}')\n\nif metric is None:\n logger.log(\"\u26a0\ufe0f Could not parse metric. Setting current_metric to None.\")\n context['current_metric'] = None # Explicitly set to None if not found\nelse:\n context['current_metric'] = metric\n logger.log(f'\u2705 Metric Parsed and Set: {metric}')\n"
304304
},
305305
"id": "step4_5_parse",
306306
"label": "4.5 Parse Metric",

0 commit comments

Comments
 (0)