googleapis / googleapis/python-aiplatform

Installing python-aiplatform && KFP on the same enviroment breaks KFP

Đang mở
#2,921 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
api: vertex-ai
Ngôn ngữ chính
Python
Star
905
Fork
465
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

Mô tả

#### Environment details

- OS type and version: Ubuntu 22.04
- Python version: 3.11.3
- pip version: 23.1.2
- `google-cloud-aiplatform` version: 1.36.0

#### Steps to reproduce

1. Create a new venv
2. `python -m pip install kfp==2.4.0
3. `python -m pip install google-cloud-aiplatform==1.36.0`

#### Code example

```python
import kfp
```

#### Stack trace
```
Traceback (most recent call last):
File "/home/davidnet/Documents/personal/aip_problem/main.py", line 1, in
import kfp
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/__init__.py", line 40, in
from kfp import components # noqa: keep unused import
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/components/__init__.py", line 27, in
from kfp.components.load_yaml_utilities import load_component_from_file
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/components/load_yaml_utilities.py", line 18, in
from kfp.dsl import structures
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/__init__.py", line 232, in
from kfp.dsl.component_decorator import component
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/component_decorator.py", line 19, in
from kfp.dsl import component_factory
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/component_factory.py", line 27, in
from kfp.dsl import container_component_class
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/container_component_class.py", line 18, in
from kfp.dsl import base_component
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/base_component.py", line 19, in
from kfp.dsl import pipeline_task
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/pipeline_task.py", line 26, in
from kfp.dsl import structures
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/dsl/structures.py", line 34, in
from kfp.pipeline_spec import pipeline_spec_pb2
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/kfp/pipeline_spec/pipeline_spec_pb2.py", line 38, in
_descriptor.EnumValueDescriptor(
File "/home/davidnet/Documents/personal/aip_problem/.venv/lib/python3.11/site-packages/google/protobuf/descriptor.py", line 780, in __new__
_message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
1. Downgrade the protobuf package to 3.20.x or lower.
2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
```

The only way to solve it is to set the enviroment variable, should this be also filled in kfp?

Thanks

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện lỗi trong một môi trường ảo Python 3.11 mới bằng hai lệnh pip và ví dụ `import kfp` được nêu. Kiểm tra các ràng buộc của những dependency liên quan đến protobuf đã cài đặt và xác định liệu xung đột có thuộc về package này hay không; được xem là hoàn tất khi vấn đề tương thích đã được giải quyết hoặc workaround cần thiết đã được tài liệu hóa và xác minh rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
google-cloud, python
Lĩnh vực
machine-learning
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.