Skip to content

Commit

Permalink
Merge pull request #520 from GoogleCloudPlatform/kfp-datadependency-fix
Browse files Browse the repository at this point in the history
Remove data dependencies in the KFP modules
  • Loading branch information
takumiohym authored Sep 10, 2024
2 parents 832a7e6 + 33c6e0f commit 81aafdc
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 3 deletions.
23 changes: 22 additions & 1 deletion notebooks/kubeflow_pipelines/cicd/labs/kfp_cicd_vertex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"PROJECT_ID = PROJECT_ID[0]\n",
"REGION = \"us-central1\"\n",
"ARTIFACT_STORE = f\"gs://{PROJECT_ID}-kfp-artifact-store\"\n",
"os.environ[\"REGION\"] = REGION"
"os.environ[\"REGION\"] = REGION\n",
"os.environ[\"ARTIFACT_STORE\"] = ARTIFACT_STORE"
]
},
{
Expand All @@ -60,6 +61,26 @@
"!gsutil ls | grep ^{ARTIFACT_STORE}/$ || gsutil mb -l {REGION} {ARTIFACT_STORE}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Also, this notebook assumes the dataset is already created and stored in Google Cloud Storage following the instructions covered in the [walkthrough notebook](https://github.com/GoogleCloudPlatform/asl-ml-immersion/blob/master/notebooks/kubeflow_pipelines/walkthrough/solutions/kfp_walkthrough_vertex.ipynb).\n",
"\n",
"If you haven't run it, please run the cell below and create the dataset before running the pipeline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"gsutil cp gs://asl-public/data/covertype/training/dataset.csv $ARTIFACT_STORE/data/training/dataset.csv\n",
"gsutil cp gs://asl-public/data/covertype/validation/dataset.csv $ARTIFACT_STORE/data/validation/dataset.csv"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
31 changes: 29 additions & 2 deletions notebooks/kubeflow_pipelines/cicd/solutions/kfp_cicd_vertex.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"PROJECT_ID = PROJECT_ID[0]\n",
"REGION = \"us-central1\"\n",
"ARTIFACT_STORE = f\"gs://{PROJECT_ID}-kfp-artifact-store\"\n",
"os.environ[\"REGION\"] = REGION"
"os.environ[\"REGION\"] = REGION\n",
"os.environ[\"ARTIFACT_STORE\"] = ARTIFACT_STORE"
]
},
{
Expand All @@ -67,12 +68,38 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"!gsutil ls | grep ^{ARTIFACT_STORE}/$ || gsutil mb -l {REGION} {ARTIFACT_STORE}"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"Also, this notebook assumes the dataset is already created and stored in Google Cloud Storage following the instructions covered in the [walkthrough notebook](https://github.com/GoogleCloudPlatform/asl-ml-immersion/blob/master/notebooks/kubeflow_pipelines/walkthrough/solutions/kfp_walkthrough_vertex.ipynb).\n",
"\n",
"If you haven't run it, please run the cell below and create the dataset before running the pipeline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"%%bash\n",
"gsutil cp gs://asl-public/data/covertype/training/dataset.csv $ARTIFACT_STORE/data/training/dataset.csv\n",
"gsutil cp gs://asl-public/data/covertype/validation/dataset.csv $ARTIFACT_STORE/data/validation/dataset.csv"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,26 @@
"!gsutil ls | grep ^{ARTIFACT_STORE}/$ || gsutil mb -l {REGION} {ARTIFACT_STORE}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Also, this notebook assumes the dataset is already created and stored in Google Cloud Storage following the instructions covered in the [walkthrough notebook](https://github.com/GoogleCloudPlatform/asl-ml-immersion/blob/master/notebooks/kubeflow_pipelines/walkthrough/solutions/kfp_walkthrough_vertex.ipynb).\n",
"\n",
"If you haven't run it, please run the cell below and create the dataset before running the pipeline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"gsutil cp gs://asl-public/data/covertype/training/dataset.csv $TRAINING_FILE_PATH\n",
"gsutil cp gs://asl-public/data/covertype/validation/dataset.csv $VALIDATION_FILE_PATH"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,26 @@
"!gsutil ls | grep ^{ARTIFACT_STORE}/$ || gsutil mb -l {REGION} {ARTIFACT_STORE}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Also, this notebook assumes the dataset is already created and stored in Google Cloud Storage following the instructions covered in the [walkthrough notebook](https://github.com/GoogleCloudPlatform/asl-ml-immersion/blob/master/notebooks/kubeflow_pipelines/walkthrough/solutions/kfp_walkthrough_vertex.ipynb).\n",
"\n",
"If you haven't run it, please run the cell below and create the dataset before running the pipeline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"gsutil cp gs://asl-public/data/covertype/training/dataset.csv $TRAINING_FILE_PATH\n",
"gsutil cp gs://asl-public/data/covertype/validation/dataset.csv $VALIDATION_FILE_PATH"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,26 @@
"!gsutil ls | grep ^{ARTIFACT_STORE}/$ || gsutil mb -l {REGION} {ARTIFACT_STORE}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Also, this notebook assumes the dataset is already created and stored in Google Cloud Storage following the instructions covered in the [walkthrough notebook](https://github.com/GoogleCloudPlatform/asl-ml-immersion/blob/master/notebooks/kubeflow_pipelines/walkthrough/solutions/kfp_walkthrough_vertex.ipynb).\n",
"\n",
"If you haven't run it, please run the cell below and create the dataset before running the pipeline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%bash\n",
"gsutil cp gs://asl-public/data/covertype/training/dataset.csv $TRAINING_FILE_PATH\n",
"gsutil cp gs://asl-public/data/covertype/validation/dataset.csv $VALIDATION_FILE_PATH"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,28 @@
"!gsutil ls | grep ^{ARTIFACT_STORE}/$ || gsutil mb -l {REGION} {ARTIFACT_STORE}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Also, this notebook assumes the dataset is already created and stored in Google Cloud Storage following the instructions covered in the [walkthrough notebook](https://github.com/GoogleCloudPlatform/asl-ml-immersion/blob/master/notebooks/kubeflow_pipelines/walkthrough/solutions/kfp_walkthrough_vertex.ipynb).\n",
"\n",
"If you haven't run it, please run the cell below and create the dataset before running the pipeline."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"%%bash\n",
"gsutil cp gs://asl-public/data/covertype/training/dataset.csv $TRAINING_FILE_PATH\n",
"gsutil cp gs://asl-public/data/covertype/validation/dataset.csv $VALIDATION_FILE_PATH"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down

0 comments on commit 81aafdc

Please sign in to comment.