Search code examples
google-cloud-vertex-aikubeflowkubeflow-pipelinesvertex-ai-pipeline

Sudden ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib error on pipeline


My pipelines and schedulers were running smoothly without any problems. After I went out to lunch, I changed the number of epochs a Neural Network would run, save the .yaml file again and leave it in the bucket named "budgetff".

Afterwards, everything stopped working.

No clue

enter image description here

There are the errors and I have 0 clue as to how they are appearing. The code within the components doesn't even seem to start. I've made several different components without any success because they just fail at this step.

If it helps, I installed the kfp --pre and did the imports like this

import kfp.v2.dsl, kfp.v2.compiler
from kfp.v2.dsl import Artifact, Dataset, Input, Metrics, Model, Output

kfp-2.0.0-beta.15 - This is the kfp version running on VertexAi and I'm using Kubeflow with @kfp.v2.dsl.components.

I was trying to just run my pipelines. Forcing a run on the scheduler. When it didn't work, I just tried on the notebook.


Solution

  • I ran into the same issue today and was scratching my head. I found adding appengine-python-standard to the packages_to_install argument in the component decorator solved the issue:

    @component(base_image="python:3.7", packages_to_install=["appengine-python-standard",...])
    

    For context, I'm using KFP v1.8.20 through Vertex workbench. Fingers crossed, it works for v2.0.0-beta.15.