kubeflow / website

Kubeflow's public website
Creative Commons Attribution 4.0 International
145 stars 751 forks source link

Deprecated Functions #3745

Open hanantabak2 opened 1 month ago

hanantabak2 commented 1 month ago

This Documentation has some deprecated functions as follows :

1- In the snippet : def merge_csv(file_path: comp.InputPath('Tarball'), output_csv: comp.OutputPath('CSV')):

It should be : from kfp.dsl import InputPath, OutputPath def merge_csv(file_path: InputPath('Tarball'), output_csv: OutputPath('CSV')):

2- Also when I run this snippet : create_step_merge_csv = kfp.components.create_component_from_func( func=merge_csv, output_component_file='component.yaml', # This is optional. It saves the component spec for future use. base_image='python:3.7', packages_to_install=['pandas==1.1.4'])

I get this error : AttributeError: module 'kfp.components' has no attribute 'create_component_from_func'

hbelmiro commented 1 month ago

Thank you for reporting @hanantabak2. Are you willing to send a PR?