Comments (6)
@dizcology That works!
It printed:
"Long running operation..."
export_model_response: done
and I have a bucket with one model.tflite file
The export_model_sample should include the "export_format_id" as well as the example from GCP.
Thank you very much for your time and help.
from python-aiplatform.
Hello @zdhernandez: Thank you for reporting the issue. The service defaults to the first supported export formats if it is not specified in the request: https://github.com/googleapis/python-aiplatform/blob/master/google/cloud/aiplatform_v1beta1/types/model_service.py#L220-L225
So it appears that the model you have does not support any export format. Only certain model types support model export: tabular and edge according to the documentation.
from python-aiplatform.
@dizcology The model that I am trying to export is of type: MOBILE_TF_LOW_LATENCY_1
Did I forget to pass an extra argument?
update: I double-checked the AIPlatform and I can confirm it is an edge model.
When I go under the "Model Properties" tab I can see:
- Algorithm: AutoML Edge
- Objective: Image classification (Single-label)
from python-aiplatform.
Thank you @zdhernandez, for good measure could you try again with a modified request like this: https://github.com/googleapis/python-aiplatform/blob/master/samples/snippets/export_model_video_action_recognition_sample.py#L34-L37
(Looking at the sample test, it seems you might need to format the string in a certain particular way.)
from python-aiplatform.
@dizcology I tried:
output_config = { "artifact_destination": "gs://my-bucket-vcm/model-123123123123/tflite/2021-01-28T16:00:00.000Z/", "export_format_id": "tflite", }
and got:
Traceback (most recent call last):
File "/app/main.py", line 676, in <module>
response = aiplatform_model_client.export_model(name=name, output_config=output_config)
File "/usr/local/lib/python3.8/site-packages/google/cloud/aiplatform_v1beta1/services/model_service/client.py", line 924, in export_model
request.output_config = output_config
File "/usr/local/lib/python3.8/site-packages/proto/message.py", line 584, in __setattr__
pb_value = marshal.to_proto(pb_type, value)
File "/usr/local/lib/python3.8/site-packages/proto/marshal/marshal.py", line 205, in to_proto
pb_value = rule.to_proto(value)
File "/usr/local/lib/python3.8/site-packages/proto/marshal/rules/message.py", line 32, in to_proto
return self._descriptor(**value)
TypeError: Parameter to MergeFrom() must be instance of same class: expected google.cloud.aiplatform.v1beta1.GcsDestination got str.
from python-aiplatform.
I think the value of artifact_destination
needs to be a Python dict or a protobuf message. Please try something like the following:
output_config = {
"artifact_destination": {"output_uri_prefix": "gs://..."},
"export_format_id": "tflite",
}
from python-aiplatform.
Related Issues (20)
- BadRequest: 400 POST https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?%24alt=json%3Benum-encoding%3Dint: Only one candidate can be specified
- Function Calling returning 400 using example from the documentation HOT 1
- tests.system.aiplatform.test_dataset.TestDataset: test_get_new_dataset_and_import failed HOT 1
- tests.system.aiplatform.test_experiment_model.TestExperimentModel: test_deploy_model_with_gpu_container failed HOT 1
- tests.system.aiplatform.test_experiments.TestExperiments: test_get_experiments_df failed HOT 1
- tests.system.aiplatform.test_experiments.TestExperiments: test_get_experiments_df_include_time_series_false failed HOT 1
- tests.system.vertexai.test_generative_models.TestGenerativeModels: test_generate_content_streaming failed HOT 27
- tests.system.vertexai.test_generative_models.TestGenerativeModels: test_generate_content_streaming_async failed HOT 27
- Including more than 1 tool for a Gemini Model results in 400 - Request contains an invalid argument HOT 4
- Including Tools prevents Gemini from providing a natural language (generalized) response HOT 3
- System Instructions are completely ignored when using Grounding with Google Search
- tests.system.vertexai.test_reasoning_engines.TestReasoningEngines: test_reasoning_engine_all failed HOT 2
- tests.system.aiplatform.test_model_monitoring.TestModelDeploymentMonitoring: test_create_endpoint failed HOT 1
- tests.system.aiplatform.test_model_monitoring.TestModelDeploymentMonitoring: test_mdm_two_models_one_valid_config failed HOT 1
- tests.system.aiplatform.test_model_monitoring.TestModelDeploymentMonitoring: test_mdm_two_models_two_valid_configs failed HOT 1
- tests.system.aiplatform.test_model_monitoring.TestModelDeploymentMonitoring: test_mdm_two_models_invalid_configs_xai failed HOT 1
- tests.unit.aiplatform.test_metadata.TestExperiments: test_get_experiment_df failed HOT 5
- tests.system.vertexai.test_bigframes_sklearn.TestRemoteExecutionBigframesSklearn: test_remote_execution_sklearn failed HOT 1
- tests.system.aiplatform.test_persistent_resource.TestPersistentResource: test_create_persistent_resource failed HOT 1
- EDIT: Update Documentation on response_mime_type HOT 3
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 python-aiplatform.