Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Initial commit
  • Loading branch information
Nethra Sashikar committed Oct 11, 2024
commit 70f83937ad6b377417784f055b1ced713a506fc8
3 changes: 2 additions & 1 deletion sdk/ml/azure-ai-ml/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## 1.22.0 (unreleased)

### Features Added

- Added support to select firewall sku to used for provisioning azure firewall when FQDN rules are added in
AllowOnlyApprovedOutbound mode. FirewallSku options are `Standard` or `Basic`, defaults to `Strandard`
### Bugs Fixed

## 1.21.0 (2024-09-30)
Expand Down
14 changes: 11 additions & 3 deletions sdk/ml/azure-ai-ml/azure/ai/ml/_ml_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from azure.ai.ml._restclient.v2024_01_01_preview import AzureMachineLearningWorkspaces as ServiceClient012024Preview
from azure.ai.ml._restclient.v2024_04_01_preview import AzureMachineLearningWorkspaces as ServiceClient042024Preview
from azure.ai.ml._restclient.v2024_07_01_preview import AzureMachineLearningWorkspaces as ServiceClient072024Preview
from azure.ai.ml._restclient.v2024_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102024Preview
from azure.ai.ml._restclient.workspace_dataplane import (
AzureMachineLearningWorkspaces as ServiceClientWorkspaceDataplane,
)
Expand Down Expand Up @@ -377,6 +378,13 @@ def __init__(
**kwargs,
)

self._service_client_10_2024_preview = ServiceClient102024Preview(
credential=self._credential,
subscription_id=self._operation_scope._subscription_id,
base_url=base_url,
**kwargs,
)

# A general purpose, user-configurable pipeline for making
# http requests
self._requests_pipeline = HttpPipeline(**kwargs)
Expand Down Expand Up @@ -474,7 +482,7 @@ def __init__(

self._workspaces = WorkspaceOperations(
self._ws_operation_scope if registry_reference else self._operation_scope,
self._service_client_07_2024_preview,
self._service_client_10_2024_preview,
self._operation_container,
self._credential,
requests_pipeline=self._requests_pipeline,
Expand All @@ -485,7 +493,7 @@ def __init__(

self._workspace_outbound_rules = WorkspaceOutboundRuleOperations(
self._operation_scope,
self._service_client_07_2024_preview,
self._service_client_10_2024_preview,
self._operation_container,
self._credential,
**kwargs,
Expand Down Expand Up @@ -702,7 +710,7 @@ def __init__(

self._featurestores = FeatureStoreOperations(
self._operation_scope,
self._service_client_07_2024_preview,
self._service_client_10_2024_preview,
self._operation_container,
self._credential,
**app_insights_handler_kwargs, # type: ignore[arg-type]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30415,8 +30415,6 @@ def __init__(
class ServiceTagDestination(msrest.serialization.Model):
"""Service Tag destination for a Service Tag Outbound Rule for the managed network of a machine learning workspace.

Variables are only populated by the server, and will be ignored when sending a request.

:ivar action: The action enum for networking rule. Possible values include: "Allow", "Deny".
:vartype action: str or ~azure.mgmt.machinelearningservices.models.RuleAction
:ivar address_prefixes: Optional, if provided, the ServiceTag property will be ignored.
Expand All @@ -30429,10 +30427,6 @@ class ServiceTagDestination(msrest.serialization.Model):
:vartype service_tag: str
"""

_validation = {
'address_prefixes': {'readonly': True},
}

_attribute_map = {
'action': {'key': 'action', 'type': 'str'},
'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'},
Expand All @@ -30445,6 +30439,7 @@ def __init__(
self,
*,
action: Optional[Union[str, "RuleAction"]] = None,
address_prefixes: Optional[List[str]] = None,
port_ranges: Optional[str] = None,
protocol: Optional[str] = None,
service_tag: Optional[str] = None,
Expand All @@ -30453,6 +30448,8 @@ def __init__(
"""
:keyword action: The action enum for networking rule. Possible values include: "Allow", "Deny".
:paramtype action: str or ~azure.mgmt.machinelearningservices.models.RuleAction
:keyword address_prefixes: Optional, if provided, the ServiceTag property will be ignored.
:paramtype address_prefixes: list[str]
:keyword port_ranges:
:paramtype port_ranges: str
:keyword protocol:
Expand All @@ -30462,7 +30459,7 @@ def __init__(
"""
super(ServiceTagDestination, self).__init__(**kwargs)
self.action = action
self.address_prefixes = None
self.address_prefixes = address_prefixes
self.port_ranges = port_ranges
self.protocol = protocol
self.service_tag = service_tag
Expand Down Expand Up @@ -34879,6 +34876,9 @@ def __init__(
the workspace. Possible values include: "AccessKey", "Identity", "UserDelegationSAS".
:paramtype system_datastores_auth_mode: str or
~azure.mgmt.machinelearningservices.models.SystemDatastoresAuthMode
:keyword system_datastores_auth_mode: The auth mode used for accessing the system datastores of
the workspace.
:paramtype system_datastores_auth_mode: str
:keyword v1_legacy_mode: Enabling v1_legacy_mode may prevent you from using features provided
by the v2 API.
:paramtype v1_legacy_mode: bool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
from pathlib import Path
from typing import Any, Dict, Optional, Union

from azure.ai.ml._restclient.v2024_07_01_preview.models import Workspace as RestWorkspace
from azure.ai.ml._restclient.v2024_10_01_preview.models import Workspace as RestWorkspace
from azure.ai.ml._schema._feature_store.feature_store_schema import FeatureStoreSchema
from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY
from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, PARAMS_OVERRIDE_KEY, WorkspaceKind
from azure.ai.ml.entities._credentials import IdentityConfiguration, ManagedIdentityConfiguration
from azure.ai.ml.entities._util import load_from_dict
from azure.ai.ml.entities._workspace.compute_runtime import ComputeRuntime
from azure.ai.ml.entities._workspace.customer_managed_key import CustomerManagedKey
from azure.ai.ml.entities._workspace.feature_store_settings import FeatureStoreSettings
from azure.ai.ml.entities._workspace.networking import ManagedNetwork
from azure.ai.ml.entities._workspace.workspace import Workspace
from azure.ai.ml.constants._common import WorkspaceKind

from ._constants import DEFAULT_SPARK_RUNTIME_VERSION
from .materialization_store import MaterializationStore

Expand Down Expand Up @@ -167,6 +167,8 @@ def _from_rest_object(cls, rest_obj: RestWorkspace) -> Optional["FeatureStore"]:
return None

workspace_object = Workspace._from_rest_object(rest_obj)
print("featurestore")
print(workspace_object.managed_network.isolation_mode)
if workspace_object is not None:
return FeatureStore(
name=str(workspace_object.name),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
# pylint: disable=too-many-instance-attributes,protected-access
from typing import Any, Dict, List, Optional

from azure.ai.ml._restclient.v2024_07_01_preview.models import (
Workspace as RestWorkspace,
WorkspaceHubConfig as RestWorkspaceHubConfig,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import Workspace as RestWorkspace
from azure.ai.ml._restclient.v2024_10_01_preview.models import WorkspaceHubConfig as RestWorkspaceHubConfig
from azure.ai.ml._schema.workspace import HubSchema
from azure.ai.ml._utils._experimental import experimental
from azure.ai.ml.constants._common import WorkspaceKind
Expand Down
12 changes: 8 additions & 4 deletions sdk/ml/azure-ai-ml/azure/ai/ml/entities/_workspace/diagnose.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
# ---------------------------------------------------------

import json
from typing import Any, Dict, Optional, List
from typing import Any, Dict, List, Optional

from azure.ai.ml._restclient.v2024_07_01_preview.models import (
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
DiagnoseRequestProperties as RestDiagnoseRequestProperties,
DiagnoseResponseResult as RestDiagnoseResponseResult,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import DiagnoseResponseResult as RestDiagnoseResponseResult
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
DiagnoseResponseResultValue as RestDiagnoseResponseResultValue,
DiagnoseResult as RestDiagnoseResult,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import DiagnoseResult as RestDiagnoseResult
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
DiagnoseWorkspaceParameters as RestDiagnoseWorkspaceParameters,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from typing import Optional

from azure.ai.ml._restclient.v2024_07_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings
from azure.ai.ml._restclient.v2024_10_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings
from azure.ai.ml.entities._mixins import RestTranslatableMixin

from .compute_runtime import ComputeRuntime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
from abc import ABC
from typing import Any, Dict, List, Optional

from azure.ai.ml._restclient.v2024_07_01_preview.models import (
FqdnOutboundRule as RestFqdnOutboundRule,
from azure.ai.ml._restclient.v2024_10_01_preview.models import FqdnOutboundRule as RestFqdnOutboundRule
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
ManagedNetworkProvisionStatus as RestManagedNetworkProvisionStatus,
ManagedNetworkSettings as RestManagedNetwork,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import ManagedNetworkSettings as RestManagedNetwork
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
PrivateEndpointDestination as RestPrivateEndpointOutboundRuleDestination,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
PrivateEndpointOutboundRule as RestPrivateEndpointOutboundRule,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
ServiceTagDestination as RestServiceTagOutboundRuleDestination,
ServiceTagOutboundRule as RestServiceTagOutboundRule,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import ServiceTagOutboundRule as RestServiceTagOutboundRule
from azure.ai.ml.constants._workspace import IsolationMode, OutboundRuleCategory, OutboundRuleType


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from marshmallow.exceptions import ValidationError

from azure.ai.ml._restclient.v2024_07_01_preview.models import (
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
ServerlessComputeSettings as RestServerlessComputeSettings,
)
from azure.ai.ml._schema._utils.utils import ArmId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
from pathlib import Path
from typing import IO, Any, AnyStr, Dict, List, Optional, Tuple, Type, Union

from azure.ai.ml._restclient.v2024_07_01_preview.models import (
FeatureStoreSettings as RestFeatureStoreSettings,
ManagedNetworkSettings as RestManagedNetwork,
ManagedServiceIdentity as RestManagedServiceIdentity,
from azure.ai.ml._restclient.v2024_10_01_preview.models import FeatureStoreSettings as RestFeatureStoreSettings
from azure.ai.ml._restclient.v2024_10_01_preview.models import ManagedNetworkSettings as RestManagedNetwork
from azure.ai.ml._restclient.v2024_10_01_preview.models import ManagedServiceIdentity as RestManagedServiceIdentity
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
ServerlessComputeSettings as RestServerlessComputeSettings,
Workspace as RestWorkspace,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import Workspace as RestWorkspace
from azure.ai.ml._schema.workspace.workspace import WorkspaceSchema
from azure.ai.ml._utils.utils import dump_yaml_to_file
from azure.ai.ml.constants._common import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import List, Optional

from azure.ai.ml._restclient.v2024_07_01_preview.models import ListWorkspaceKeysResult
from azure.ai.ml._restclient.v2024_10_01_preview.models import ListWorkspaceKeysResult


class ContainerRegistryCredential:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@

from marshmallow import ValidationError

from azure.ai.ml._restclient.v2024_07_01_preview import AzureMachineLearningWorkspaces as ServiceClient072024Preview
from azure.ai.ml._restclient.v2024_07_01_preview.models import ManagedNetworkProvisionOptions
from azure.ai.ml._restclient.v2024_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102024Preview
from azure.ai.ml._restclient.v2024_10_01_preview.models import ManagedNetworkProvisionOptions
from azure.ai.ml._scope_dependent_operations import OperationsContainer, OperationScope
from azure.ai.ml._telemetry import ActivityType, monitor_with_activity
from azure.ai.ml._utils._logger_utils import OpsLogger
from azure.ai.ml._utils.utils import camel_to_snake
from azure.ai.ml.constants import ManagedServiceIdentityType
from azure.ai.ml.constants._common import Scope, WorkspaceKind
from azure.ai.ml.entities import (
WorkspaceConnection,
IdentityConfiguration,
ManagedIdentityConfiguration,
ManagedNetworkProvisionStatus,
WorkspaceConnection,
)
from azure.ai.ml.entities._feature_store._constants import (
OFFLINE_MATERIALIZATION_STORE_TYPE,
Expand Down Expand Up @@ -58,7 +58,7 @@ class FeatureStoreOperations(WorkspaceOperationsBase):
def __init__(
self,
operation_scope: OperationScope,
service_client: ServiceClient072024Preview,
service_client: ServiceClient102024Preview,
all_operations: OperationsContainer,
credentials: Optional[TokenCredential] = None,
**kwargs: Dict,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

from marshmallow import ValidationError

from azure.ai.ml._restclient.v2024_07_01_preview import AzureMachineLearningWorkspaces as ServiceClient072024Preview
from azure.ai.ml._restclient.v2024_07_01_preview.models import ManagedNetworkProvisionOptions
from azure.ai.ml._restclient.v2024_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102024Preview
from azure.ai.ml._restclient.v2024_10_01_preview.models import ManagedNetworkProvisionOptions
from azure.ai.ml._scope_dependent_operations import OperationsContainer, OperationScope
from azure.ai.ml._telemetry import ActivityType, monitor_with_activity
from azure.ai.ml._utils._http_utils import HttpPipeline
Expand Down Expand Up @@ -52,7 +52,7 @@ class WorkspaceOperations(WorkspaceOperationsBase):
def __init__(
self,
operation_scope: OperationScope,
service_client: ServiceClient072024Preview,
service_client: ServiceClient102024Preview,
all_operations: OperationsContainer,
credentials: Optional[TokenCredential] = None,
**kwargs: Any,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

from azure.ai.ml._arm_deployments import ArmDeploymentExecutor
from azure.ai.ml._arm_deployments.arm_helper import get_template
from azure.ai.ml._restclient.v2024_07_01_preview import AzureMachineLearningWorkspaces as ServiceClient072024Preview
from azure.ai.ml._restclient.v2024_07_01_preview.models import (
from azure.ai.ml._restclient.v2024_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102024Preview
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
EncryptionKeyVaultUpdateProperties,
EncryptionUpdateProperties,
WorkspaceUpdateParameters,
Expand Down Expand Up @@ -60,7 +60,7 @@ class WorkspaceOperationsBase(ABC):
def __init__(
self,
operation_scope: OperationScope,
service_client: ServiceClient072024Preview,
service_client: ServiceClient102024Preview,
all_operations: OperationsContainer,
credentials: Optional[TokenCredential] = None,
**kwargs: Dict,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

from typing import Any, Dict, Iterable, Optional

from azure.ai.ml._restclient.v2024_07_01_preview import AzureMachineLearningWorkspaces as ServiceClient072024Preview
from azure.ai.ml._restclient.v2024_07_01_preview.models import OutboundRuleBasicResource
from azure.ai.ml._restclient.v2024_10_01_preview import AzureMachineLearningWorkspaces as ServiceClient102024Preview
from azure.ai.ml._restclient.v2024_10_01_preview.models import OutboundRuleBasicResource
from azure.ai.ml._scope_dependent_operations import OperationsContainer, OperationScope
from azure.ai.ml._telemetry import ActivityType, monitor_with_activity
from azure.ai.ml._utils._logger_utils import OpsLogger
Expand All @@ -28,7 +28,7 @@ class WorkspaceOutboundRuleOperations:
def __init__(
self,
operation_scope: OperationScope,
service_client: ServiceClient072024Preview,
service_client: ServiceClient102024Preview,
all_operations: OperationsContainer,
credentials: TokenCredential = None,
**kwargs: Dict,
Expand Down Expand Up @@ -56,7 +56,7 @@ def get(self, workspace_name: str, outbound_rule_name: str, **kwargs: Any) -> Ou
.. admonition:: Example:

.. literalinclude:: ../samples/ml_samples_workspace.py
:start-after: [START outbound_rule_get]
:start-after: [START outbound_rule_get] ../tests/workspace/unittests/test_workspace_entity.py
:end-before: [END outbound_rule_get]
:language: python
:dedent: 8
Expand Down
2 changes: 1 addition & 1 deletion sdk/ml/azure-ai-ml/dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pytest-mock
pytest
pydash
azure-mgmt-msi
pywin32==304 ; sys_platform == 'win32'
pywin32==307 ; sys_platform == 'win32'
docker;platform.python_implementation!="PyPy"
numpy;platform.python_implementation!="PyPy"
scikit-image;platform.python_implementation!="PyPy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@
from marshmallow.exceptions import ValidationError

from azure.ai.ml import load_workspace
from azure.ai.ml._restclient.v2024_07_01_preview.models import Workspace
from azure.ai.ml._restclient.v2024_10_01_preview.models import Workspace
from azure.ai.ml.constants._workspace import IsolationMode
from azure.ai.ml.entities import (
ServerlessComputeSettings,
Workspace,
)
from azure.ai.ml.entities import ServerlessComputeSettings, Workspace


@pytest.mark.unittest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from pytest_mock import MockFixture

from azure.ai.ml import load_workspace
from azure.ai.ml._restclient.v2024_07_01_preview.models import (
from azure.ai.ml._restclient.v2024_10_01_preview.models import (
ServerlessComputeSettings as RestServerlessComputeSettings,
Workspace as RestWorkspace,
)
from azure.ai.ml._restclient.v2024_10_01_preview.models import Workspace as RestWorkspace
from azure.ai.ml._scope_dependent_operations import OperationScope
from azure.ai.ml.entities import (
CustomerManagedKey,
Expand Down
Loading