Registry / gcp / google-cloud-automl

google-cloud-automl

JSON →
library2.20.1pypypi✓ verified 24d ago

The `google-cloud-automl` Python client library provides programmatic access to the Google Cloud AutoML API, enabling developers to train high-quality machine learning models tailored to specific business needs without extensive ML expertise. It leverages Google's state-of-the-art transfer learning and Neural Architecture Search technology. Currently at version 2.18.1, the library follows a frequent release cadence, typical of Google Cloud client libraries, with new versions often published weekly or bi-weekly. While functional, Google strongly recommends migrating to the Vertex AI SDK (`google-cloud-aiplatform`) for new development, as Vertex AI represents the next generation of Google's AI platform with enhanced features and MLOps capabilities.

pip install google-cloud-automl
INSTALL
IMPORT
SIG · GOOGLE-CLOUD-AUTOM
G
google-cloud-automl
gcppythonv2.20.1
Install
5.6s avg
Import
1669ms
Disk
71MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.20.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.968s · 72.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.6s · import 1.370s · 71MB
71MB installed
● package 71MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AutoMlClient
from google.cloud import automl
from google.cloud import automl_v1

This quickstart demonstrates how to list existing AutoML datasets in a specified Google Cloud project and location. Ensure your `GOOGLE_CLOUD_PROJECT` environment variable is set to your project ID, and `GOOGLE_CLOUD_LOCATION` (defaulting to `us-central1`) is set to the desired region. You must also have the AutoML API enabled and appropriate IAM permissions (e.g., `roles/automl.viewer` or `roles/automl.editor`) for your authenticated service account.

import os from google.cloud import automl_v1 from google.api_core.exceptions import GoogleAPIError def list_automl_datasets(project_id: str, location: str): """Lists all AutoML datasets for a given project and location.""" try: client = automl_v1.AutoMlClient() project_location = f"projects/{project_id}/locations/{location}" print(f"Listing datasets for project '{project_id}' in location '{location}'...") datasets = client.list_datasets(parent=project_location) found_datasets = False for dataset in datasets: found_datasets = True print(f"- Dataset name: {dataset.display_name} (ID: {dataset.name.split('/')[-1]})") print(f" Full Resource Name: {dataset.name}") print(f" State: {automl_v1.Dataset.State(dataset.example_count_state).name}") print(f" Creation Time: {dataset.create_time.strftime('%Y-%m-%d %H:%M:%S UTC')}") if not found_datasets: print("No datasets found.") except GoogleAPIError as e: print(f"An API error occurred: {e}") except Exception as e: print(f"An unexpected error occurred: {e}") if __name__ == "__main__": project_id = os.environ.get("GOOGLE_CLOUD_PROJECT") location = os.environ.get("GOOGLE_CLOUD_LOCATION", "us-central1") # Default location if not project_id: print("Error: GOOGLE_CLOUD_PROJECT environment variable not set.") print("Please set it to your Google Cloud project ID.") else: list_automl_datasets(project_id, location)
Debug
Known issues
deprecatedGoogle strongly recommends migrating to the Vertex AI SDK for Python (`google-cloud-aiplatform`) for new machine learning development. The `google-cloud-automl` library primarily targets an older generation of AutoML tools. While this library remains functional, future feature development, enhanced capabilities, and the best user experience are focused within Vertex AI.
fix
Install `google-cloud-aiplatform` (`pip install google-cloud-aiplatform`) and refer to the Vertex AI SDK documentation for modern AutoML and ML Platform functionalities.
affects: All versions (starting from `2.x.x` as the shift became prominent)
breakingThis library requires Python >= 3.7. Versions prior to 3.7 are not supported. Specifically, the last version compatible with Python 3.6 is `google-cloud-automl==2.7.3`, and Python 2.7 support ended with `google-cloud-automl==1.0.1`.
fix
Upgrade your Python environment to 3.7 or newer. If you must use Python 3.6, explicitly pin your dependency to `google-cloud-automl==2.7.3`.
affects: All versions >= 2.7.4
gotchaProper authentication and IAM permissions are crucial for interacting with the AutoML API. Common issues include the AutoML API not being enabled in the Google Cloud project, an incorrect service account lacking necessary roles (e.g., `roles/automl.editor`), or the `GOOGLE_APPLICATION_CREDENTIALS` environment variable not being correctly set to point to your service account key file. This is especially prone to error in non-standard execution environments like Jupyter notebooks.
fix
1. Ensure the Google Cloud AutoML API is enabled in your project. 2. Create a Google Cloud service account with at least the `AutoML Editor` role. 3. Download the JSON key file for the service account. 4. Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the absolute path of this JSON key file (e.g., `export GOOGLE_APPLICATION_CREDENTIALS=/path/to/your-service-account-key.json`). 5. Set `GOOGLE_CLOUD_PROJECT` to your project ID.
affects: All versions
Upgrade
Version history
2.20.1latest on PyPI · released Aug 24, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
24
OpenAI (training)
1
Resources
google-cloud-automl — pip install google-cloud-automl · libregistry