Skip to content

Commit 9c09b2d

Browse files
committed
docs: update import paths in README and add note about PYTHONPATH
Signed-off-by: Yi Zheng <237498169+beatsmonster@users.noreply.github.com>
1 parent 413d154 commit 9c09b2d

File tree

1 file changed

+9
-5
lines changed
  • components/data_processing/sdg/sdg_hub

1 file changed

+9
-5
lines changed

components/data_processing/sdg/sdg_hub/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ This component wraps the SDG Hub SDK to execute composable data generation flows
3737

3838
## Usage
3939

40+
> **Note:** The import paths below assume you are compiling from the repo root with
41+
> `PYTHONPATH=.`. If you installed `kfp-components` as a package, use
42+
> `from kfp_components.components.data_processing.sdg.sdg_hub import sdg` instead.
43+
4044
### Basic PVC Input
4145

4246
```python
43-
from components.sdg.sdg_hub import sdg
47+
from components.data_processing.sdg.sdg_hub import sdg
4448
from kfp import dsl
4549
from kfp_kubernetes import mount_pvc, use_secret_as_env
4650

@@ -72,7 +76,7 @@ def my_pipeline():
7276
Chain SDG with upstream components by consuming their output artifacts:
7377

7478
```python
75-
from components.sdg.sdg_hub import sdg
79+
from components.data_processing.sdg.sdg_hub import sdg
7680
from kfp import dsl
7781
from kfp_kubernetes import use_secret_as_env
7882

@@ -106,7 +110,7 @@ def chained_pipeline():
106110
Export generated data to a PVC for archival or external access:
107111

108112
```python
109-
from components.sdg.sdg_hub import sdg
113+
from components.data_processing.sdg.sdg_hub import sdg
110114
from kfp import dsl
111115
from kfp_kubernetes import mount_pvc, use_secret_as_env
112116

@@ -172,7 +176,7 @@ import tempfile
172176

173177
import pandas as pd
174178

175-
from components.sdg.sdg_hub.component import sdg
179+
from components.data_processing.sdg.sdg_hub.component import sdg
176180

177181

178182
class Artifact:
@@ -271,7 +275,7 @@ oc create configmap sdg-prompts \
271275
```python
272276
from kfp import compiler, dsl
273277
from kfp.kubernetes import use_config_map_as_volume, use_secret_as_env
274-
from components.sdg.sdg_hub.component import sdg
278+
from components.data_processing.sdg.sdg_hub.component import sdg
275279

276280

277281
@dsl.component(

0 commit comments

Comments
 (0)