Skip to content

Commit

Permalink
Fixing code sample-notebook (#749)
Browse files Browse the repository at this point in the history
* Fixing Google colab link

Signed-off-by: Santosh Borse <ssborse@us.ibm.com>

* Using the correct runtime class

Signed-off-by: Santosh Borse <ssborse@us.ibm.com>

* 1. Upgrade to latest version of DPK, 2. fix the DocID transform

Signed-off-by: Santosh Borse <ssborse@us.ibm.com>

---------

Signed-off-by: Santosh Borse <ssborse@us.ibm.com>
  • Loading branch information
santoshborse authored Nov 4, 2024
1 parent 5877e4d commit 23f907d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions examples/notebooks/fine tuning/code/sample-notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/IBM/data-prep-kit/blob/dev/examples/notebooks/code/sample-notebook.ipynb\">\n",
"<a href=\"https://colab.research.google.com/github/IBM/data-prep-kit/blob/dev/examples/notebooks/fine tuning/code/sample-notebook.ipynb\">\n",
" <img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/>\n",
"</a>"
]
Expand Down Expand Up @@ -49,7 +49,8 @@
"outputs": [],
"source": [
"%%capture logpip --no-stderr\n",
"!pip install data-prep-toolkit-transforms-ray==0.2.1.dev1\n",
"!pip3 install 'data-prep-toolkit[ray]==0.2.2.dev1'\n",
"!pip3 install 'data-prep-toolkit-transforms[ray,all]==0.2.2.dev1'\n",
"!pip install datasets\n",
"!pip install pandas"
]
Expand Down Expand Up @@ -284,7 +285,7 @@
"source": [
"import os\n",
"import sys\n",
"from ededup_transform_ray import EdedupRayTransformConfiguration\n",
"from ededup_transform_ray import EdedupRayTransformRuntimeConfiguration\n",
"\n",
"input_folder = parquet_data_output # Output of previous stage is used as input.\n",
"output_folder = \"sample_data/ededup_out\"\n",
Expand All @@ -304,7 +305,7 @@
"\n",
"params = common_config_params | ededup_params\n",
"sys.argv = ParamsUtils.dict_to_req(d=params)\n",
"ededup_launcher = RayTransformLauncher(EdedupRayTransformConfiguration()) \n",
"ededup_launcher = RayTransformLauncher(EdedupRayTransformRuntimeConfiguration()) \n",
"ededup_launcher.launch()"
]
},
Expand Down Expand Up @@ -355,7 +356,7 @@
"output_folder = \"sample_data/docid_out\"\n",
"\n",
"\n",
"from doc_id_transform_ray import DocIDRayTransformConfiguration\n",
"from doc_id_transform_ray import DocIDRayTransformRuntimeConfiguration\n",
"local_conf = {\n",
" \"input_folder\": input_folder,\n",
" \"output_folder\": output_folder,\n",
Expand All @@ -371,7 +372,7 @@
"\n",
"params = doc_id_params | common_config_params\n",
"sys.argv = ParamsUtils.dict_to_req(d=params)\n",
"launcher = RayTransformLauncher(DocIDRayTransformConfiguration())\n",
"launcher = RayTransformLauncher(DocIDRayTransformRuntimeConfiguration())\n",
"launcher.launch()"
]
},
Expand Down

0 comments on commit 23f907d

Please sign in to comment.