Hub Class
Note
This is an experimental class, and may change at any time. Please see https://aka.ms/azuremlexperimental for more information.
A Hub is a special type of workspace that acts as a parent and resource container for lightweight child workspaces called projects. Resources like the hub's storage account, key vault, and container registry are shared by all child projects.
As a type of workspace, hub management is controlled by an MLClient's workspace operations.
Creating a Hub object.
from azure.ai.ml.entities import Hub
ws = Hub(name="sample-ws", location="eastus", description="a sample workspace hub object")
- Inheritance
-
azure.ai.ml.entities._workspace.workspace.WorkspaceHub
Constructor
Hub(*, name: str, description: str | None = None, tags: Dict[str, str] | None = None, display_name: str | None = None, location: str | None = None, resource_group: str | None = None, managed_network: ManagedNetwork | None = None, storage_account: str | None = None, key_vault: str | None = None, container_registry: str | None = None, customer_managed_key: CustomerManagedKey | None = None, public_network_access: str | None = None, identity: IdentityConfiguration | None = None, primary_user_assigned_identity: str | None = None, enable_data_isolation: bool = False, default_resource_group: str | None = None, associated_workspaces: List[str] | None = None, **kwargs: Any)
Parameters
Name | Description |
---|---|
name
Required
|
Name of the hub. |
description
Required
|
Description of the hub. |
tags
Required
|
Tags of the hub. |
display_name
Required
|
Display name for the hub. This is non-unique within the resource group. |
location
Required
|
The location to create the hub in. If not specified, the same location as the resource group will be used. |
resource_group
Required
|
Name of resource group to create the hub in. |
managed_network
Required
|
Hub's Managed Network configuration |
storage_account
Required
|
The resource ID of an existing storage account to use instead of creating a new one. |
key_vault
Required
|
The resource ID of an existing key vault to use instead of creating a new one. |
container_registry
Required
|
The resource ID of an existing container registry to use instead of creating a new one. |
customer_managed_key
Required
|
Key vault details for encrypting data with customer-managed keys. If not specified, Microsoft-managed keys will be used by default. |
image_build_compute
Required
|
The name of the compute target to use for building environment. Docker images with the container registry is behind a VNet. |
public_network_access
Required
|
Whether to allow public endpoint connectivity. when a workspace is private link enabled. |
identity
Required
|
The hub's Managed Identity (user assigned, or system assigned). |
primary_user_assigned_identity
Required
|
The hub's primary user assigned identity. |
enable_data_isolation
Required
|
A flag to determine if workspace has data isolation enabled. The flag can only be set at the creation phase, it can't be updated. |
default_resource_group
Required
|
The resource group that will be used by projects created under this hub if no resource group is specified. |
kwargs
Required
|
A dictionary of additional configuration parameters. |
Methods
dump |
Dump the workspace spec into a file in yaml format. |
dump
Dump the workspace spec into a file in yaml format.
dump(dest: str | PathLike | IO, **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
dest
Required
|
The destination to receive this workspace's spec. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable. |
Attributes
associated_workspaces
The workspaces associated with the hub.
Returns
Type | Description |
---|---|
The resource group. |
base_path
creation_context
The creation context of the resource.
Returns
Type | Description |
---|---|
The creation metadata for the resource. |
default_resource_group
The default resource group for this hub and its children.
Returns
Type | Description |
---|---|
The resource group. |
discovery_url
Backend service base URLs for the workspace.
Returns
Type | Description |
---|---|
Backend service URLs of the workspace |
id
The resource ID.
Returns
Type | Description |
---|---|
The global ID of the resource, an Azure Resource Manager (ARM) ID. |
mlflow_tracking_uri
MLflow tracking uri for the workspace.
Returns
Type | Description |
---|---|
Returns mlflow tracking uri of the workspace. |
Azure SDK for Python