Registry / azure / azureml-train-automl-client

azureml-train-automl-client

JSON →
library1.62.0pypypi✓ verified 85d ago

The `azureml-train-automl-client` library is a core component of the Azure Machine Learning Python SDK v1, enabling users to automatically find the best machine learning model and its hyperparameters for various tasks like classification, regression, and forecasting. As of version 1.62.0, it supports Python versions >=3.8 and <3.12. Its release cadence is tightly coupled with the broader Azure ML SDK v1, which typically saw monthly or bi-monthly updates.

pip install azureml-train-automl-client
INSTALL
IMPORT
SIG · AZUREML-TRAIN-AUTO
A
azureml-train-automl-client
azurepythonv1.62.0
Install
25.1s avg
Import
3259ms
Disk
562MB
Pass rate
3/ 10
Env Coverage3 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.62.0 · 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
glibc
py 3.10
✕ build_error
✓ 23.68s
py 3.11
✕ build_error
✓ 24.05s
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 27.65s
562MB installed
● package 562MB
Code
Verified usage

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

AutoMLConfig
from azureml.train.automl import AutoMLConfig
AutoMLTabularFeaturizationConfig
from azureml.train.automl.automl_config import AutoMLTabularFeaturizationConfig
Workspace
from azureml.core import Workspace
from azureml.train.automl import Workspace
Workspace is part of `azureml-core`, not `azureml-train-automl-client`.

This quickstart demonstrates how to initialize an `AutoMLConfig` for a classification task. It first attempts to load an existing Azure ML Workspace using environment variables. It then creates an `Experiment` object and provides a template for configuring and submitting an AutoML run. Note that for actual execution, you must provide a valid `training_data` `Dataset` object, `label_column_name`, and a `compute_target`.

import os from azureml.core import Workspace, Experiment, Dataset from azureml.train.automl import AutoMLConfig # Placeholder for Azure ML Workspace details subscription_id = os.environ.get('AZURE_SUBSCRIPTION_ID', 'your_subscription_id') resource_group = os.environ.get('AZURE_RESOURCE_GROUP', 'your_resource_group') workspace_name = os.environ.get('AZURE_WORKSPACE_NAME', 'your_workspace_name') # Ensure these are replaced with actual valid values or environment variables if 'your_' in subscription_id or 'your_' in resource_group or 'your_' in workspace_name: print("WARNING: Please set AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP, AZURE_WORKSPACE_NAME environment variables ") print("or replace placeholder values in the quickstart code for actual execution.") # Exit or use dummy data for demonstration if not intended to run live exit(1) try: ws = Workspace.get(name=workspace_name, subscription_id=subscription_id, resource_group=resource_group) print(f"Workspace '{ws.name}' loaded successfully.") except Exception as e: print(f"Could not load workspace. Error: {e}") # Handle workspace creation or authentication error exit(1) # Create an experiment experiment = Experiment(workspace=ws, name='automl-quickstart-experiment') # Example: Load a registered dataset (replace with your actual dataset) # For a real run, you'd register a dataset or use a local one. # This is a dummy to make the code runnable for structure. # In a real scenario, you'd load your training data like: # training_data = Dataset.get_by_name(ws, name='my_training_dataset') # Create a dummy AutoMLConfig (requires actual data and compute for a real run) automl_config = AutoMLConfig( task='classification', primary_metric='accuracy', experiment_timeout_minutes=30, training_data=None, # Replace with your actual Dataset object, e.g., training_data label_column_name='target_column', # Replace with your target column name compute_target='cpu-cluster', # Replace with your compute target name enable_early_stopping=True, n_cross_validations=5, max_concurrent_iterations=2, max_cores_per_iteration=-1, # Use all available cores # Additional settings like featurization, blacklisting, etc. can be added ) print("AutoMLConfig created. To run, you would submit it:") print("run = experiment.submit(automl_config, show_output=True)") print("run.wait_for_completion(show_output=True)") # To run the experiment: # run = experiment.submit(automl_config, show_output=True) # run.wait_for_completion(show_output=True)
Debug
Known issues
breakingThe `azureml-train-automl-client` package is part of the Azure ML SDK v1. Microsoft has released a new v2 SDK (`azure-ai-ml`) with different APIs, import paths, and paradigms. Mixing v1 and v2 SDK components can lead to breaking changes or unexpected behavior.
fix
Choose either v1 (`azureml-*` packages) or v2 (`azure-ai-ml` packages) for your project and stick to it. Do not mix them in the same codebase. For new projects, consider the v2 SDK (`azure-ai-ml`).
affects: All versions of azureml-train-automl-client when used with v2 SDK components.
gotchaPython version compatibility for `azureml-train-automl-client` and the broader Azure ML SDK v1 can be very strict. Using unsupported Python versions (e.g., Python 3.7 or 3.11/3.12+ for older SDK versions) can lead to installation failures or runtime errors.
fix
Always check the `requires_python` field on PyPI for the specific `azureml-train-automl-client` version you intend to use. For 1.62.0, ensure your environment uses Python >=3.8 and <3.12.
affects: All versions prior to 1.62.0 (which supports <3.12, >=3.8). Specific ranges vary by SDK version.
gotchaAutoML runs require a healthy and accessible compute target (e.g., an Azure Machine Learning Compute Instance or Compute Cluster). If the compute target is not found, not running, or lacks sufficient resources, the experiment submission will fail.
fix
Ensure your compute target is created, started, and healthy in your Azure ML workspace. Verify its name matches the `compute_target` parameter in `AutoMLConfig` and that it has enough nodes/resources for your job.
affects: All versions.
gotchaInput data for AutoML (training data, validation data) must be accessible from the compute target. This usually means registering it as an `azureml.core.Dataset` in the workspace and ensuring the compute target has network access to the datastore.
fix
Register your data as a `Dataset` in your Azure ML workspace. When defining `AutoMLConfig`, pass the `Dataset` object directly to `training_data` and `validation_data`. Ensure your compute target has appropriate identity or credential access to the underlying datastore.
affects: All versions.
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'azureml.train.automl'
The `azureml-train-automl-client` package is not installed in the current Python environment or the environment is not activated.
fix
Run `pip install azureml-train-automl-client`. If using multiple environments, activate the correct one before running your script (e.g., `conda activate my_env`).
UserErrorException: WorkspaceNotFound: The workspace 'your_workspace_name' could not be found.
The provided workspace name, subscription ID, or resource group is incorrect, or the authenticated user does not have access to it.
fix
Verify the workspace details (name, subscription_id, resource_group) are accurate. Ensure your Azure credentials are set up correctly and have 'Contributor' or 'Azure Machine Learning Data Scientist' role on the workspace/resource group.
UserErrorException: The provided compute target 'my_compute_cluster' could not be found or is in an invalid state.
The compute target specified in `AutoMLConfig` does not exist, is not running, or has been deleted.
fix
Check the Azure ML workspace UI to confirm the compute target exists and is in a healthy state. Verify the name used in `AutoMLConfig(compute_target='...')` exactly matches the compute target name in your workspace.
TypeError: __init__ received an unexpected keyword argument 'some_parameter'
You are passing an unsupported parameter to `AutoMLConfig` or a related class, often due to a version mismatch between your installed `azureml-train-automl-client` and the documentation you are following.
fix
Consult the official Microsoft Learn documentation for your specific `azureml-train-automl-client` version to confirm valid parameters for `AutoMLConfig`. Update your `azureml-train-automl-client` package to the latest version if you are trying to use newer features.
Upgrade
Version history
1.62.0latest on PyPI · released Feb 25, 2026
Audit
Dependencies
azureml-corerequiredThis package is a client for the Azure ML platform and requires core functionalities like Workspace and Experiment management.
azureml-telemetryrequiredUsed for collecting usage data and diagnostics.
Agent activity
18 hits · last 30 days
node
15
OpenAI (training)
1
Resources
azureml-train-automl-client — pip install azureml-train-automl-client · libregistry