googleapis / googleapis/python-aiplatform

Importing predictor module fails on windows due to incorrect separator replacement

未关闭
#5,679 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api: vertex-ai
主要语言
Python
星标
905
派生
465
平均合并
1 天 13 小时
30 天内合并 PR
44

描述

Thanks for stopping by to let us know something could be better!

**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/python-aiplatform/issues
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python

If you are still having issues, please be sure to include as much information as possible:

#### Environment details

- OS type and version: Windows 11
- Python version: `python --version`: 3.11
- pip version: `pip --version`: 25.1.1
- `google-cloud-aiplatform` version: `pip show google-cloud-aiplatform`: 1.103.0

#### Steps to reproduce

1. Use a custom Predictor in a module in a directory below the current directory publishing a local model
2. Build a CPR model and deploy to a local endpoint

#### Code example

This line converts the path to the Predictor class to posix format, but then attempts to replace os-specific path separators with '.' to convert to an import. On windows, the path separator does not match posix format, thus the posix forward slash remains causing failed imports.

https://github.com/googleapis/python-aiplatform/blob/553c42311fbe6a79eb88eb63cf76796e929bdbfa/google/cloud/aiplatform/utils/prediction_utils.py#L76

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。