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, OutputPathdef 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'
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'