You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using code exactly from the documentation, runs into this error:
$ python -m pipeline
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/jupyter/mlops-on-gcp/test/pipeline.py", line 4, in<module>
def addition_pipeline(x: int, y: int) -> int:
File "/opt/conda/lib/python3.10/site-packages/kfp/dsl/pipeline_context.py", line 65, in pipeline
return component_factory.create_graph_component_from_func(
File "/opt/conda/lib/python3.10/site-packages/kfp/dsl/component_factory.py", line 673, in create_graph_component_from_func
return graph_component.GraphComponent(
File "/opt/conda/lib/python3.10/site-packages/kfp/dsl/graph_component.py", line 58, in __init__
pipeline_outputs = pipeline_func(*args_list)
File "/home/jupyter/mlops-on-gcp/test/pipeline.py", line 5, in addition_pipeline
task1 = add(a=x, b=y)
NameError: name 'add' is not defined
$ python -m pipeline
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/jupyter/mlops-on-gcp/test/pipeline.py", line 2, in<module>
from src.my_component import add
File "/home/jupyter/mlops-on-gcp/test/src/my_component.py", line 2, in<module>
from math_utils import add_numbers
ModuleNotFoundError: No module named 'math_utils'
The text was updated successfully, but these errors were encountered:
How do I import
add
inpipeline.py
while using containerized python components?Here's my directory structure
Using code exactly from the documentation, runs into this error:
Updating
pipeline.py
to the below coderuns into this error
The text was updated successfully, but these errors were encountered: