英文:
Different library version during the run of vertex pipeline vs in the docker container
问题
我在Vertex AI管道中使用了一个自定义组件,它是一个自定义组件。
```python
@component(
base_image=f"gcr.io..."
)
def temp_step():
在组件运行期间,我希望它与Base Image中的库版本相同。但是当我尝试时,我发现在我的Docker容器中有以下版本:
google-api-core==2.11.1
google-auth==2.21.0
google-auth-oauthlib==1.0.0
google-cloud-aiplatform==1.9.0
google-cloud-appengine-logging==0.2.0
google-cloud-audit-log==0.2.5
google-cloud-bigquery==2.26.0
google-cloud-core==2.3.3
google-cloud-logging==2.6.0
google-cloud-storage==1.42.2
但在管道中组件运行期间,版本如下:
google-api-core==2.10.2
google-api-python-client==1.12.11
google-auth==1.35.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==1.0.0
google-cloud-aiplatform==1.9.0
google-cloud-appengine-logging==0.2.0
google-cloud-audit-log==0.2.5
google-cloud-bigquery==2.26.0
google-cloud-core==2.3.3
google-cloud-logging==2.6.0
google-cloud-storage==1.42.2
有人知道为什么会有这种差异吗?
我尝试进行比较,但它们不同。我期望能够解释为什么组件与基础镜像不同?
<details>
<summary>英文:</summary>
I am using a Component in a vertex ai pipeline with a custom component.
@component(
base_image=f"gcr.io..."
)
def temp_step():
It's supposed to have the same library versions during the run of the component in the Vertex AI Pipeline than in the Base Image. But when I try I see that in my docker container I have :
google-api-core==2.11.1
google-auth==2.21.0
google-auth-oauthlib==1.0.0
google-cloud-aiplatform==1.9.0
google-cloud-appengine-logging==0.2.0
google-cloud-audit-log==0.2.5
google-cloud-bigquery==2.26.0
google-cloud-core==2.3.3
google-cloud-logging==2.6.0
google-cloud-storage==1.42.2
VS in the pipeline during the run of the component
google-api-core==2.10.2
google-api-python-client==1.12.11
google-auth==1.35.0
google-auth-httplib2==0.1.0
google-auth-oauthlib==1.0.0
google-cloud-aiplatform==1.9.0
google-cloud-appengine-logging==0.2.0
google-cloud-audit-log==0.2.5
google-cloud-bigquery==2.26.0
google-cloud-core==2.3.3
google-cloud-logging==2.6.0
google-cloud-storage==1.42.2
Someone knows why I have this difference ?
I tried to compare both and it was different. I am expecting an explanation why the component is different from the base image ?
</details>
# 答案1
**得分**: 1
将此内容发布为社区维基:
正如楼主所发现的,将kfp库添加到requirements.txt中解决了谷歌包版本被更改的问题。
<details>
<summary>英文:</summary>
Posting this as a community wiki:
As what OP figured out, adding the kfp library in the requirements.txt solved the issue of the versions of the google packages being changed.
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论