|
896 | 896 | }, |
897 | 897 | { |
898 | 898 | "cell_type": "code", |
899 | | - "execution_count": null, |
| 899 | + "execution_count": 191, |
900 | 900 | "id": "1fea8332", |
901 | 901 | "metadata": {}, |
902 | 902 | "outputs": [], |
|
943 | 943 | }, |
944 | 944 | { |
945 | 945 | "cell_type": "code", |
946 | | - "execution_count": null, |
| 946 | + "execution_count": 192, |
947 | 947 | "id": "497c496b", |
948 | 948 | "metadata": {}, |
949 | 949 | "outputs": [], |
|
958 | 958 | }, |
959 | 959 | { |
960 | 960 | "cell_type": "code", |
961 | | - "execution_count": null, |
| 961 | + "execution_count": 193, |
962 | 962 | "id": "dcc28585", |
963 | 963 | "metadata": {}, |
964 | | - "outputs": [], |
| 964 | + "outputs": [ |
| 965 | + { |
| 966 | + "name": "stdout", |
| 967 | + "output_type": "stream", |
| 968 | + "text": [ |
| 969 | + "Converted retries value: 3 -> Retry(total=3, connect=None, read=None, redirect=None, status=None)\n", |
| 970 | + "Starting new HTTPS connection (1): storage.googleapis.com:443\n" |
| 971 | + ] |
| 972 | + }, |
| 973 | + { |
| 974 | + "name": "stdout", |
| 975 | + "output_type": "stream", |
| 976 | + "text": [ |
| 977 | + "https://storage.googleapis.com:443 \"GET /storage/v1/b/federated-learning-resources-zy-2?fields=name&prettyPrint=false HTTP/1.1\" 200 44\n", |
| 978 | + "Creating PipelineJob\n", |
| 979 | + "Creating PipelineJob\n", |
| 980 | + "PipelineJob created. Resource name: projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104\n", |
| 981 | + "PipelineJob created. Resource name: projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104\n", |
| 982 | + "To use this PipelineJob in another session:\n", |
| 983 | + "To use this PipelineJob in another session:\n", |
| 984 | + "pipeline_job = aiplatform.PipelineJob.get('projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104')\n", |
| 985 | + "pipeline_job = aiplatform.PipelineJob.get('projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104')\n", |
| 986 | + "View Pipeline Job:\n", |
| 987 | + "https://console.cloud.google.com/vertex-ai/locations/us-central1/pipelines/runs/example-pipeline-20250421180104?project=144763482491\n", |
| 988 | + "View Pipeline Job:\n", |
| 989 | + "https://console.cloud.google.com/vertex-ai/locations/us-central1/pipelines/runs/example-pipeline-20250421180104?project=144763482491\n", |
| 990 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 991 | + "3\n", |
| 992 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 993 | + "3\n", |
| 994 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 995 | + "3\n", |
| 996 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 997 | + "3\n", |
| 998 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 999 | + "3\n", |
| 1000 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1001 | + "3\n", |
| 1002 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1003 | + "3\n", |
| 1004 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1005 | + "3\n", |
| 1006 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1007 | + "3\n", |
| 1008 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1009 | + "3\n", |
| 1010 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1011 | + "3\n", |
| 1012 | + "PipelineJob projects/144763482491/locations/us-central1/pipelineJobs/example-pipeline-20250421180104 current state:\n", |
| 1013 | + "3\n" |
| 1014 | + ] |
| 1015 | + }, |
| 1016 | + { |
| 1017 | + "ename": "RuntimeError", |
| 1018 | + "evalue": "Job failed with:\ncode: 9\nmessage: \" The DAG failed because some tasks failed. The failed tasks are: [initialize-model].; Job (project_id = cit-oconnellka-9999, job_id = 7211998170207748096) is failed due to the above error.; Failed to handle the job: {project_number = 144763482491, job_id = 7211998170207748096}\"\n", |
| 1019 | + "output_type": "error", |
| 1020 | + "traceback": [ |
| 1021 | + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", |
| 1022 | + "\u001b[31mRuntimeError\u001b[39m Traceback (most recent call last)", |
| 1023 | + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[193]\u001b[39m\u001b[32m, line 14\u001b[39m\n\u001b[32m 3\u001b[39m aiplatform.init(project=\u001b[33m\"\u001b[39m\u001b[33mcit-oconnellka-9999\u001b[39m\u001b[33m\"\u001b[39m, location=\u001b[33m\"\u001b[39m\u001b[33mus-central1\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m 5\u001b[39m pipeline_job = aiplatform.PipelineJob(\n\u001b[32m 6\u001b[39m display_name=\u001b[33m\"\u001b[39m\u001b[33mexample-pipeline\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m 7\u001b[39m template_path=\u001b[33m\"\u001b[39m\u001b[33mexample-pipeline.json\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 11\u001b[39m }\n\u001b[32m 12\u001b[39m )\n\u001b[32m---> \u001b[39m\u001b[32m14\u001b[39m \u001b[43mpipeline_job\u001b[49m\u001b[43m.\u001b[49m\u001b[43mrun\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n", |
| 1024 | + "\u001b[36mFile \u001b[39m\u001b[32m~/Library/Python/3.12/lib/python/site-packages/google/cloud/aiplatform/pipeline_jobs.py:334\u001b[39m, in \u001b[36mPipelineJob.run\u001b[39m\u001b[34m(self, service_account, network, reserved_ip_ranges, sync, create_request_timeout, enable_preflight_validations)\u001b[39m\n\u001b[32m 310\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"Run this configured PipelineJob and monitor the job until completion.\u001b[39;00m\n\u001b[32m 311\u001b[39m \n\u001b[32m 312\u001b[39m \u001b[33;03mArgs:\u001b[39;00m\n\u001b[32m (...)\u001b[39m\u001b[32m 330\u001b[39m \u001b[33;03m Optional. Whether to enable preflight validations for the PipelineJob.\u001b[39;00m\n\u001b[32m 331\u001b[39m \u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 332\u001b[39m network = network \u001b[38;5;129;01mor\u001b[39;00m initializer.global_config.network\n\u001b[32m--> \u001b[39m\u001b[32m334\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_run\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 335\u001b[39m \u001b[43m \u001b[49m\u001b[43mservice_account\u001b[49m\u001b[43m=\u001b[49m\u001b[43mservice_account\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 336\u001b[39m \u001b[43m \u001b[49m\u001b[43mnetwork\u001b[49m\u001b[43m=\u001b[49m\u001b[43mnetwork\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 337\u001b[39m \u001b[43m \u001b[49m\u001b[43mreserved_ip_ranges\u001b[49m\u001b[43m=\u001b[49m\u001b[43mreserved_ip_ranges\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 338\u001b[39m \u001b[43m \u001b[49m\u001b[43msync\u001b[49m\u001b[43m=\u001b[49m\u001b[43msync\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 339\u001b[39m \u001b[43m \u001b[49m\u001b[43mcreate_request_timeout\u001b[49m\u001b[43m=\u001b[49m\u001b[43mcreate_request_timeout\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 340\u001b[39m \u001b[43m \u001b[49m\u001b[43menable_preflight_validations\u001b[49m\u001b[43m=\u001b[49m\u001b[43menable_preflight_validations\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 341\u001b[39m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", |
| 1025 | + "\u001b[36mFile \u001b[39m\u001b[32m~/Library/Python/3.12/lib/python/site-packages/google/cloud/aiplatform/base.py:863\u001b[39m, in \u001b[36moptional_sync.<locals>.optional_run_in_thread.<locals>.wrapper\u001b[39m\u001b[34m(*args, **kwargs)\u001b[39m\n\u001b[32m 861\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m:\n\u001b[32m 862\u001b[39m VertexAiResourceNounWithFutureManager.wait(\u001b[38;5;28mself\u001b[39m)\n\u001b[32m--> \u001b[39m\u001b[32m863\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mmethod\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 865\u001b[39m \u001b[38;5;66;03m# callbacks to call within the Future (in same Thread)\u001b[39;00m\n\u001b[32m 866\u001b[39m internal_callbacks = []\n", |
| 1026 | + "\u001b[36mFile \u001b[39m\u001b[32m~/Library/Python/3.12/lib/python/site-packages/google/cloud/aiplatform/pipeline_jobs.py:382\u001b[39m, in \u001b[36mPipelineJob._run\u001b[39m\u001b[34m(self, service_account, network, reserved_ip_ranges, sync, create_request_timeout, enable_preflight_validations)\u001b[39m\n\u001b[32m 353\u001b[39m \u001b[38;5;250m\u001b[39m\u001b[33;03m\"\"\"Helper method to ensure network synchronization and to run\u001b[39;00m\n\u001b[32m 354\u001b[39m \u001b[33;03mthe configured PipelineJob and monitor the job until completion.\u001b[39;00m\n\u001b[32m 355\u001b[39m \n\u001b[32m (...)\u001b[39m\u001b[32m 372\u001b[39m \u001b[33;03m Optional. Whether to enable preflight validations for the PipelineJob.\u001b[39;00m\n\u001b[32m 373\u001b[39m \u001b[33;03m\"\"\"\u001b[39;00m\n\u001b[32m 374\u001b[39m \u001b[38;5;28mself\u001b[39m.submit(\n\u001b[32m 375\u001b[39m service_account=service_account,\n\u001b[32m 376\u001b[39m network=network,\n\u001b[32m (...)\u001b[39m\u001b[32m 379\u001b[39m enable_preflight_validations=enable_preflight_validations,\n\u001b[32m 380\u001b[39m )\n\u001b[32m--> \u001b[39m\u001b[32m382\u001b[39m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_block_until_complete\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 384\u001b[39m \u001b[38;5;66;03m# AutoSxS view model evaluations\u001b[39;00m\n\u001b[32m 385\u001b[39m \u001b[38;5;28;01mfor\u001b[39;00m details \u001b[38;5;129;01min\u001b[39;00m \u001b[38;5;28mself\u001b[39m.task_details:\n", |
| 1027 | + "\u001b[36mFile \u001b[39m\u001b[32m~/Library/Python/3.12/lib/python/site-packages/google/cloud/aiplatform/pipeline_jobs.py:793\u001b[39m, in \u001b[36mPipelineJob._block_until_complete\u001b[39m\u001b[34m(self)\u001b[39m\n\u001b[32m 790\u001b[39m \u001b[38;5;66;03m# Error is only populated when the job state is\u001b[39;00m\n\u001b[32m 791\u001b[39m \u001b[38;5;66;03m# JOB_STATE_FAILED or JOB_STATE_CANCELLED.\u001b[39;00m\n\u001b[32m 792\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mself\u001b[39m._gca_resource.state \u001b[38;5;129;01min\u001b[39;00m _PIPELINE_ERROR_STATES:\n\u001b[32m--> \u001b[39m\u001b[32m793\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mRuntimeError\u001b[39;00m(\u001b[33m\"\u001b[39m\u001b[33mJob failed with:\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[33m\"\u001b[39m % \u001b[38;5;28mself\u001b[39m._gca_resource.error)\n\u001b[32m 794\u001b[39m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[32m 795\u001b[39m _LOGGER.log_action_completed_against_resource(\u001b[33m\"\u001b[39m\u001b[33mrun\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mcompleted\u001b[39m\u001b[33m\"\u001b[39m, \u001b[38;5;28mself\u001b[39m)\n", |
| 1028 | + "\u001b[31mRuntimeError\u001b[39m: Job failed with:\ncode: 9\nmessage: \" The DAG failed because some tasks failed. The failed tasks are: [initialize-model].; Job (project_id = cit-oconnellka-9999, job_id = 7211998170207748096) is failed due to the above error.; Failed to handle the job: {project_number = 144763482491, job_id = 7211998170207748096}\"\n" |
| 1029 | + ] |
| 1030 | + } |
| 1031 | + ], |
965 | 1032 | "source": [ |
966 | 1033 | "from google.cloud import aiplatform\n", |
967 | 1034 | "\n", |
|
1676 | 1743 | ] |
1677 | 1744 | } |
1678 | 1745 | ], |
1679 | | - "metadata": {}, |
| 1746 | + "metadata": { |
| 1747 | + "language_info": { |
| 1748 | + "name": "python" |
| 1749 | + } |
| 1750 | + }, |
1680 | 1751 | "nbformat": 4, |
1681 | 1752 | "nbformat_minor": 5 |
1682 | 1753 | } |
0 commit comments