|
488 | 488 | },
|
489 | 489 | {
|
490 | 490 | "cell_type": "code",
|
491 |
| - "execution_count": 18, |
492 |
| - "metadata": {}, |
493 |
| - "outputs": [ |
494 |
| - { |
495 |
| - "name": "stdout", |
496 |
| - "output_type": "stream", |
497 |
| - "text": [ |
498 |
| - "[2022-10-28 05:20:59Z] Completing processing run id 82ef9376-93e3-4678-bc8c-d3421870363c.\n", |
499 |
| - "[2022-10-28 05:21:00Z] Submitting 1 runs, first five are: c1f85bd1:0bd3ed1c-ebb5-4f5f-a0bc-18500d18e26e\n" |
500 |
| - ] |
501 |
| - } |
502 |
| - ], |
| 491 | + "execution_count": null, |
| 492 | + "metadata": {}, |
| 493 | + "outputs": [], |
503 | 494 | "source": [
|
504 | 495 | "# Wait until the job completes\n",
|
505 | 496 | "ml_client.jobs.stream(pipeline_job.name)"
|
|
617 | 608 | "outputs": [],
|
618 | 609 | "source": [
|
619 | 610 | "import re\n",
|
| 611 | + "from mlflow.entities import RunStatus\n", |
620 | 612 | "\n",
|
621 | 613 | "parent_run_id = ml_model[\"run_id\"][: ml_model[\"run_id\"].index(\"_\")]\n",
|
622 | 614 | "child_run_regex = re.compile(r\"[^_]+_\\d+$\")\n",
|
|
625 | 617 | " lambda x: child_run_regex.match(x.name),\n",
|
626 | 618 | " ml_client.jobs.list(parent_job_name=parent_run_id),\n",
|
627 | 619 | "):\n",
|
628 |
| - " print(\n", |
629 |
| - " f\"{child_run.name}: \"\n", |
630 |
| - " f'{mlflow_client.get_run(child_run.name).data.metrics[\"normalized_root_mean_squared_error\"]}'\n", |
631 |
| - " )" |
| 620 | + " mlflow_child_run = mlflow_client.get_run(child_run.name)\n", |
| 621 | + " if RunStatus.from_string(mlflow_child_run.info.status) == RunStatus.FINISHED:\n", |
| 622 | + " print(\n", |
| 623 | + " f\"{child_run.name}: \"\n", |
| 624 | + " f'{mlflow_child_run.data.metrics[\"normalized_root_mean_squared_error\"]}'\n", |
| 625 | + " )" |
632 | 626 | ]
|
633 | 627 | },
|
634 | 628 | {
|
|
0 commit comments