Comments (8)
Hello @khadijakhaldi and @JonB451
I just noticed this issue as closed. I took a look and the SDK for kfp
and google_cloud_pipeline_components
have shift a little since this notebook was create. I just pushed an update version of the notebook that should resolve this problem. I tested it through running the pipeline and it worked.
Thank You!
@statmike
from vertex-ai-mlops.
A workaround may be:
from google.cloud import aiplatform as gcc_aip
though this leads, later in the notebook, to:
AttributeError: module 'google.cloud.aiplatform' has no attribute 'TabularDatasetCreateOp'
from vertex-ai-mlops.
@JonB451 did you solve this ?
from vertex-ai-mlops.
Thanks @statmike . I've had to move onto something else for now, but will let you know when i get back to this. It's still high enough up my priorities that i hope that should be possible in the coming weeks so i will feedback if it worked here too. Thanks again, loads. You are a brilliant teacher, and generours, in material and in spirit it seems!
from vertex-ai-mlops.
@khadijakhaldi No, i didn't.
from vertex-ai-mlops.
@statmike Unfortunately, after pulling these changes, the imports do not work in my env.
Despite replicating your procedures as closely as possible there was at least one difference, in the creation of the notebook instance and its env version, if i remember correctly. I don't think the 'TensorFlow Enterprise 2.3' env was available (Support End Date: 16.08.23) so i used 'TensorFlow Enterprise 2.6' which is python3.9 (rather 3.7), as you can see below in excerpts from the error.
ImportError Traceback (most recent call last)
Cell In[4], line 8
----> 8 from google_cloud_pipeline_components.v1.automl.training_job import AutoMLTabularTrainingJobRunOp
File /opt/conda/lib/python3.9/site-packages/google_cloud_pipeline_components/v1/automl/training_job/init.py:16
---> 16 from google_cloud_pipeline_components.v1.automl.training_job.automl_forecasting_training_job.component import automl_forecasting_training_job as AutoMLForecastingTrainingJobRunOp
File /opt/conda/lib/python3.9/site-packages/google_cloud_pipeline_components/v1/automl/training_job/automl_forecasting_training_job/component.py:22
---> 22 from kfp.dsl import Input
ImportError: cannot import name 'Input' from 'kfp.dsl' (/opt/conda/lib/python3.9/site-packages/kfp/dsl/init.py)
from vertex-ai-mlops.
Hello @JonB451 ,
Any notebook environment should work for this. The main thing is the package installs with:
!pip install kfp google-cloud-pipeline-components google-cloud-aiplatform -q -U
To test this out I started a new environment, did these pip installs and tried importing and checking versions:
from google.cloud import aiplatform
import kfp
from kfp.v2 import compiler
#import kfp.v2.dsl as dsl
import google_cloud_pipeline_components as gcc_aip
from google_cloud_pipeline_components.v1.dataset import TabularDatasetCreateOp
from google_cloud_pipeline_components.v1.automl.training_job import AutoMLTabularTrainingJobRunOp
from google_cloud_pipeline_components.v1.endpoint import EndpointCreateOp, ModelDeployOp
!python --version
= 3.10.12aiplatform.__version__
= 1.31.1kfp.__version__
= 2.0.1gcc_aip.__version__
= 2.3.0
Maybe try fresh pip installs with the -U option?
from vertex-ai-mlops.
Hello @statmike.
Sorry i didn't respond sooner but i haven't been able to continue with this course before my GCP trial runs out.
Although i cannot remember clearly now, i wanted to thank you for your reply and to respond. My memory is that you were right, and this was resolved as you suggested with fresh installs.
All the best. Sad not to be continuing your great course!
from vertex-ai-mlops.
Related Issues (20)
- suggested updates on Prediction section in 03g HOT 3
- Tabular-dataset-create_notebook_02c HOT 3
- [04 - Vertex AI Custom Model - scikit-learn - in Notebook] Cannot deploy model to endpoint HOT 5
- ImportError: cannot import name 'aiplatform' from 'google.cloud' (unknown location) HOT 4
- On main branch, I see only notebooks 4a,4b,4c however in readme I do see a mention of 4g-4i. Where can I find that? HOT 3
- Bad Request: 400 Syntax Error : Missing whitespace between literal and alias at [1:36] in 04 - Vertex AI Custom Model - scikit-learn - in Notebook HOT 2
- Vertex AI Experiment Error (notebook 05i) HOT 23
- FR: project structure skeleton HOT 2
- Using Vertex AI Pipeline with Workflow with Generative AI HOT 1
- MLB notebook fails on API enablement when run in Vertex AI Workbench HOT 2
- Explainations error in Notebook 2a
- MLB notebook fails on permission issue until compute engine default service account granted Vertex AI User permission on project HOT 2
- Error while Configuring Local Docker to Use GCLOUD CLI HOT 2
- Could you utilize MMR for UmpireBot - MLB Rules For Baseball
- Error on Docker Run Command HOT 1
- 02c: def pipeline() gives Attribute Error. HOT 3
- 02c: change of region causes problems. HOT 1
- getting error in creating custom job from local script for 05a Notebook HOT 5
- Pipeline running error for 02c, missing permissions for the service account
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vertex-ai-mlops.