Skip to content

Commit 5d35710

Browse files
[Setup.py] Modify setup.py (#4158) (#4161)
* modify setup.py, docs/3d_bev_detection and ops/__init__.py * modidy setup.py * modify setup.py docs and pipeline_v4.py * Update 3d_bev_detection.md * Update 3d_bev_detection.en.md * modify setup.py --------- Co-authored-by: Lin Manhui <mhlin425@whu.edu.cn>
1 parent 6b10e8d commit 5d35710

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

docs/pipeline_usage/tutorials/cv_pipelines/3d_bev_detection.en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ BEVFusion is a multi-modal 3D object detection model that fuses surround camera
1212

1313
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/pipelines/3d_bev_detection/01.png">
1414

15+
Please note that the 3D multi-modal fusion detection pipeline currently does not support Python 3.12 or above.
16+
1517
<b>The 3D multi-modal fusion detection pipeline includes a 3D multi-modal fusion detection module</b>,which contains <b>a BEVFusion model</b>. We provide benchmark data for this model:
1618

1719
<p><b>3D Multi-modal Fusion Detection Module:</b></p>

docs/pipeline_usage/tutorials/cv_pipelines/3d_bev_detection.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ BEVFusion 是一种多模态 3D 目标检测模型,通过将环视摄像头图
1212

1313
<img src="https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/pipelines/3d_bev_detection/01.png">
1414

15+
请注意,3D多模态融合检测产线目前暂不支持Python 3.12及以上版本。
16+
1517
<b>3D多模态融合检测产线中包含了3D多模态融合检测模块</b>,模块中包含了一个<b>BEVFusion模型</b>,我们提供了该模型的 benchmark 数据:
1618

1719
<p><b>3D多模态融合检测模块:</b></p>

paddlex/inference/pipelines/pp_chatocr/pipeline_v4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ def mllm_pred(
638638

639639
for image_array in self.img_reader([input]):
640640

641-
image_string = cv2.imencode(".jpg", image_array)[1].tostring()
641+
image_string = cv2.imencode(".jpg", image_array)[1].tobytes()
642642
image_base64 = base64.b64encode(image_string).decode("utf-8")
643643
result = {}
644644
for key in key_list:

paddlex/ops/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ def __str__(self):
6666

6767

6868
class CustomOperatorPathFinder:
69-
def find_module(self, fullname: str, path: str = None):
69+
def find_spec(self, fullname: str, path, target=None):
7070
if not fullname.startswith("paddlex.ops"):
7171
return None
72-
73-
return CustomOperatorPathLoader()
72+
return importlib.machinery.ModuleSpec(
73+
name=fullname,
74+
loader=CustomOperatorPathLoader(),
75+
is_package=False,
76+
)
7477

7578

7679
class CustomOperatorPathLoader:

setup.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,14 @@
3737
"imagesize": "",
3838
"Jinja2": "",
3939
"joblib": "",
40-
"langchain": "== 0.2.17",
41-
"langchain-community": "== 0.2.17",
40+
"langchain": "== 0.3.25",
41+
"langchain-community": "== 0.3.24",
4242
"langchain-core": "",
43-
"langchain-openai": "== 0.1.25",
43+
"langchain-openai": "== 0.3.19",
4444
"lxml": "",
4545
"matplotlib": "",
46-
"numpy": [
47-
"== 1.24.4; python_version < '3.12'",
48-
"== 1.26.4; python_version >= '3.12'",
49-
],
50-
"openai": "== 1.63.2",
46+
"numpy": ">= 1.24",
47+
"openai": "== 1.68.2",
5148
"opencv-contrib-python": "== 4.10.0.84",
5249
"openpyxl": "",
5350
"packaging": "",
@@ -70,7 +67,7 @@
7067
"soundfile": "",
7168
"starlette": ">= 0.36",
7269
"tiktoken": "",
73-
"tokenizers": "== 0.19.1",
70+
"tokenizers": ">= 0.19",
7471
"tqdm": "",
7572
"typing-extensions": "",
7673
"ujson": "",

0 commit comments

Comments
 (0)