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
tfx pipeline compile --engine=vertex --pipeline_path=minimal_vertex_runner.py
2023-09-28 14:00:05.243828: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-09-28 14:00:06.779336: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
CLI
Compiling pipeline
Traceback (most recent call last):
File "/home/izakmarais/.pyenv/versions/minimaltfx/bin/tfx", line 8, in <module>
sys.exit(cli_group())
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/tfx/tools/cli/commands/pipeline.py", line 315, in compile_pipeline
handler_factory.create_handler(ctx.flags_dict).compile_pipeline()
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/tfx/tools/cli/handler/handler_factory.py", line 103, in create_handler
from tfx.tools.cli.handler import vertex_handler # pylint: disable=g-import-not-at-top
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/tfx/tools/cli/handler/vertex_handler.py", line 27, in <module>
from tfx.tools.cli.handler import kubeflow_handler
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/tfx/tools/cli/handler/kubeflow_handler.py", line 26, in <module>
from tfx.orchestration.kubeflow import kubeflow_dag_runner
File "/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/tfx/orchestration/kubeflow/kubeflow_dag_runner.py", line 24, in <module>
from kfp import gcp
ImportError: cannot import name 'gcp' from 'kfp' (/home/izakmarais/.pyenv/versions/3.8.16/envs/minimaltfx/lib/python3.8/site-packages/kfp/__init__.py)
Describe the expected behavior
It should not fail.
I tried to reproduce this with an example notebook and tfx compile command works successfully without any issues.
Ref: Gist
Below is the setup I used with running the notebook. Can you try installing TFX and KFP with !pip install --upgrade "tfx[kfp]<2" and try running tfx compile command. Please let us know if you face any issues. Thank you!
(We build upon the official tensorflow/tfx image, this has tfx already installed, but no kfp, so we need to install kfp separately if we want to run tfx compile inside the image).
System information
I started with a clean virtual env and did
pip install tfx=1.14.0
followed bypip install kfp
.Describe the current behavior
tfx compile
fails:Describe the expected behavior
It should not fail.
Standalone code to reproduce the issue
minimal_vertex_runner.py
:tfx pipeline compile --engine=vertex --pipeline_path=minimal_vertex_runner.py
Name of your Organization (Optional)
Takealot
The text was updated successfully, but these errors were encountered: