Feature/hps paddleocr vl 1.5#5017
Merged
Bobholamovic merged 6 commits intoPaddlePaddle:developfrom Feb 28, 2026
Merged
Conversation
Add derived pipeline support to the HPS assembly scripts so that pipelines defined in PIPELINE_APP_ROUTER (e.g. PaddleOCR-VL-1.5) can automatically reuse the source pipeline's server/client/version while substituting the correct pipeline_config.yaml. - assemble.sh: mount name_mappings.py and pipeline configs into the Docker container; resolve paths relative to the script location - assemble.py: parse PIPELINE_APP_ROUTER via ast, include mapped pipelines in --all, copy from source dir and overwrite config - docs: add PaddleOCR-VL-1.5 SDK download link to serving docs
pathlib.Path.with_suffix() treats the dot in names like PaddleOCR-VL-1.5 as a file extension, producing incorrect archive names (e.g. paddlex_hps_PaddleOCR-VL-1.tar.gz). Use string concatenation instead to preserve the full SDK name.
|
Thanks for your contribution! |
deploy/hps/sdk/scripts/assemble.py
Outdated
| CLIENT_LIB_PATH = BASE_DIR / "paddlex-hps-client" | ||
| OUTPUT_DIR = BASE_DIR / "output" | ||
| NAME_MAPPINGS_PATH = BASE_DIR / "_name_mappings.py" | ||
| PIPELINE_CONFIGS_DIR = BASE_DIR / "_pipeline_configs" |
Member
There was a problem hiding this comment.
建议类比其他产线,在pipelines目录里创建PaddleOCR-VL-1.5产线对应目录,只是其中只存放一个配置文件(pipeline_config.yaml)。这是因为高稳定性服务化部署需要的产线配置文件可能和paddlex/configs里的不一样。
- Create pipelines/PaddleOCR-VL-1.5/ with its own pipeline_config.yaml so HPS config can diverge from paddlex/configs independently - Remove _pipeline_configs volume mount from assemble.sh (no longer needed) - Remove PIPELINE_CONFIGS_DIR from assemble.py, read config from local pipeline directory instead - Add NOTE comment explaining why ast is used to parse PIPELINE_APP_ROUTER
deploy/hps/sdk/scripts/assemble.py
Outdated
| """Parse PIPELINE_APP_ROUTER from the mounted name_mappings.py file.""" | ||
| """Parse PIPELINE_APP_ROUTER from the mounted name_mappings.py file. | ||
|
|
||
| NOTE: We use `ast` to extract the dict value without importing the module, |
deploy/hps/sdk/scripts/assemble.py
Outdated
| if mapped_source is not None: | ||
| mapped_config = PIPELINE_CONFIGS_DIR / f"{pipeline_name}.yaml" | ||
| mapped_pipeline_dir = PIPELINES_DIR / pipeline_name | ||
| mapped_config = mapped_pipeline_dir / "pipeline_config.yaml" |
Member
There was a problem hiding this comment.
建议这个文件调整一下逻辑,改成mapped_pipeline_dir和pipeline_dir合并,优先使用mapped_pipeline_dir中的文件(不只限于pipeline_config.yaml)
- Move pipeline_config.yaml to server/ subdirectory to mirror source pipeline structure, enabling generic file-level merge - Use copytree with dirs_exist_ok to overlay mapped pipeline files on top of source, so any file can be overridden (not just config) - Sync config with latest: VLRecognition batch_size=-1, add Serving - Move ast NOTE from docstring to inline comment
Bobholamovic
approved these changes
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
PIPELINE_APP_ROUTER(如PaddleOCR-VL-1.5),自动复用源产线的 server/client/version,仅替换pipeline_config.yamlassemble.sh:将name_mappings.py和产线配置目录挂载到 Docker 容器中;使用脚本相对路径定位仓库根目录assemble.py:通过ast解析PIPELINE_APP_ROUTER,--all模式自动包含映射产线,从源产线目录复制并覆盖产线配置Path.with_suffix()对含点号的产线名(如PaddleOCR-VL-1.5)生成错误归档文件名的问题测试情况
bash scripts/assemble.sh PaddleOCR-VL-1.5生成output/paddlex_hps_PaddleOCR-VL-1.5_sdk.tar.gzserver/pipeline_config.yaml包含pipeline_name: PaddleOCR-VL-1.5、模型PP-DocLayoutV3和PaddleOCR-VL-1.5-0.9Bserver/model_repo/layout-parsing/1/model.py与 PaddleOCR-VL 版本一致