Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
dacfbc1
Revert change to acs_connection_id type
diondrapeck Jan 24, 2024
a9fc28f
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Jan 25, 2024
594794d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Jan 25, 2024
9ed7442
Resolve merge conflict
diondrapeck Jan 29, 2024
9495639
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Jan 31, 2024
eb4669d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 5, 2024
a1bc7b3
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 5, 2024
12a43ef
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 7, 2024
16bebb4
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 8, 2024
e5ee79f
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 20, 2024
e9fdd4f
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 21, 2024
04f17be
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 21, 2024
015db3d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Feb 22, 2024
91abebd
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Mar 1, 2024
bddcb84
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Mar 1, 2024
a0982e0
Address remaining type issues
diondrapeck Mar 2, 2024
5263c6a
Revert changes to irrelevant files
diondrapeck Mar 2, 2024
dd75b4b
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-python
diondrapeck Mar 2, 2024
9363753
Resolve merge conflict
diondrapeck Mar 2, 2024
804c3b5
Add whitespace back
diondrapeck Mar 2, 2024
26da46a
Remove unintentional change
diondrapeck Mar 2, 2024
c1dd47f
Remove Optional type annotation from get() methods
diondrapeck Mar 4, 2024
48961be
Remove duplicate overloads
diondrapeck Mar 4, 2024
a6b3627
Fix circular import
diondrapeck Mar 4, 2024
f8bbff6
Revert lost input/output overload types
diondrapeck Mar 4, 2024
a57fd06
Remove duplicate overloads for uri_folder
diondrapeck Mar 4, 2024
7770f53
Resolve merge conflict
diondrapeck Mar 4, 2024
2ae891a
Resolve merge conflict
diondrapeck Mar 4, 2024
3861412
Use type:ignore to silence known incompatibilities
diondrapeck Mar 4, 2024
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
Address remaining type issues
  • Loading branch information
diondrapeck committed Mar 2, 2024
commit a0982e001bc184eefc68cdd04095914ae8cc446d
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@
# PRLabel: %Content Safety
/sdk/contentsafety/ @mengaims @JieZhou000

# ServiceLabel: %Cognitive - Health Insights
# PRLabel: %Cognitive - Health Insights
/sdk/healthinsights/ @tomsft

# AzureSdkOwners: @mccoyp
# ServiceLabel: %KeyVault
# PRLabel: %KeyVault
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Release History

## 1.0.0b1 (2024-02-23)
## 1.0.0b1 (2024-03-01)

- Initial version
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Radiology Insights currently supports one document from one patient. Please take

### Create a RadiologyInsights request and get the result using an asynchronous client

For an example how to create a client, a request and get the result see the example in the sample folder.
For an example how to create a client, a request and get the result see the example in the [sample folder][sample_folder].

### Get Critical Result Inference information

Expand Down Expand Up @@ -147,4 +147,5 @@ additional questions or comments.
[azure_portal]: https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesHealthInsights
[azure_cli]: https://learn.microsoft.com/cli/azure/
[inferences]: https://learn.microsoft.com/azure/azure-health-insights/radiology-insights/inferences
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/
[sample_folder]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/healthinsights/azure-healthinsights-radiologyinsights/samples
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
import logging
import os
import re
from enum import Enum
from typing import Any, Dict, List, Optional, Tuple, Type, Union, cast

from marshmallow import INCLUDE, Schema

from azure.ai.ml import Input
from azure.ai.ml._schema.core.fields import NestedField, UnionField
from azure.ai.ml._schema.job.identity import AMLTokenIdentitySchema, ManagedIdentitySchema, UserIdentitySchema
from azure.ai.ml.entities._credentials import (
Expand All @@ -23,6 +25,7 @@
)
from azure.ai.ml.entities._job.job import Job
from azure.ai.ml.entities._job.parallel.run_function import RunFunction
from azure.ai.ml.entities._job.pipeline._io import NodeOutput

from ..._schema import PathAwareSchema
from ..._utils.utils import is_data_binding_expression
Expand Down Expand Up @@ -108,7 +111,7 @@ def __init__(
*,
component: Union[ParallelComponent, str],
compute: Optional[str] = None,
inputs: Optional[Dict] = None,
inputs: Optional[Dict[str, Union[NodeOutput, Input, str, bool, int, float, Enum, Input]]] = None,
outputs: Optional[Dict[str, Union[str, Output, "Output"]]] = None,
retry_settings: Optional[Union[RetrySettings, Dict]] = None,
logging_level: Optional[str] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# pylint: disable=protected-access,no-member

from pathlib import Path
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, Union

from azure.ai.ml._azure_environments import _get_storage_endpoint_from_metadata
from azure.ai.ml._restclient.v2023_04_01_preview.models import AzureBlobDatastore as RestAzureBlobDatastore
Expand All @@ -17,6 +17,7 @@
from azure.ai.ml._restclient.v2023_04_01_preview.models import DatastoreType
from azure.ai.ml._schema._datastore import AzureBlobSchema, AzureDataLakeGen2Schema, AzureFileSchema
from azure.ai.ml.constants._common import BASE_PATH_CONTEXT_KEY, TYPE
from azure.ai.ml.entities._credentials import AccountKeyConfiguration, SasTokenConfiguration
from azure.ai.ml.entities._datastore.datastore import Datastore
from azure.ai.ml.entities._datastore.utils import from_rest_datastore_credentials
from azure.ai.ml.entities._util import load_from_dict
Expand Down Expand Up @@ -44,7 +45,8 @@ class AzureFileDatastore(Datastore):
:param properties: The asset property dictionary.
:type properties: dict[str, str]
:param credentials: Credentials to use for Azure ML workspace to connect to the storage.
:type credentials: Union[AccountKeySection, SasSection]
:type credentials: Union[~azure.ai.ml.entities.AccountKeyConfiguration,
~azure.ai.ml.entities.SasTokenConfiguration]
:param kwargs: A dictionary of additional configuration parameters.
:type kwargs: dict
"""
Expand All @@ -60,7 +62,7 @@ def __init__(
endpoint: str = _get_storage_endpoint_from_metadata(),
protocol: str = HTTPS,
properties: Optional[Dict] = None,
credentials: Any,
credentials: Union[AccountKeyConfiguration, SasTokenConfiguration],
**kwargs: Any
):
kwargs[TYPE] = DatastoreType.AZURE_FILE
Expand Down Expand Up @@ -259,7 +261,7 @@ def __init__(
endpoint: str = _get_storage_endpoint_from_metadata(),
protocol: str = HTTPS,
properties: Optional[Dict] = None,
credentials: Any = None,
credentials: Optional[Union[AccountKeyConfiguration, SasTokenConfiguration]] = None,
**kwargs: Any
):
kwargs[TYPE] = DatastoreType.AZURE_DATA_LAKE_GEN2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(
query: Optional[str] = None,
table_name: Optional[str] = None,
stored_procedure: Optional[str] = None,
stored_procedure_params: Optional[List] = None,
stored_procedure_params: Optional[List[Dict]] = None,
connection: Optional[str] = None,
) -> None:
# As an annotation, it is not allowed to initialize the name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Input(_InputOutputBase): # pylint: disable=too-many-instance-attributes
def __init__(
self,
*,
type: str,
type: Literal["uri_folder"] = "uri_folder",
path: Optional[str] = None,
mode: Optional[str] = None,
optional: Optional[bool] = None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Output(_InputOutputBase):
@overload
def __init__(
self,
type: Any,
type: Literal["uri_folder"] = "uri_folder",
path: Optional[str] = None,
mode: Optional[str] = None,
description: Optional[str] = None,
Expand Down Expand Up @@ -111,6 +111,7 @@ def __init__(

def __init__(
self,
*,
type: str = AssetTypes.URI_FOLDER,
path: Optional[str] = None,
mode: Optional[str] = None,
Expand Down
6 changes: 3 additions & 3 deletions sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def status(self) -> Optional[str]:
return self._status

@property
def log_files(self) -> Optional[Dict]:
def log_files(self) -> Optional[Dict[str, str]]:
"""Job output files.

:return: The dictionary of log names and URLs.
Expand Down Expand Up @@ -208,10 +208,10 @@ def _resolve_cls_and_type(cls, data: Dict, params_override: Optional[List[Dict]]
from azure.ai.ml.entities._builders.command import Command
from azure.ai.ml.entities._builders.spark import Spark
from azure.ai.ml.entities._job.automl.automl_job import AutoMLJob
from azure.ai.ml.entities._job.finetuning.finetuning_job import FineTuningJob
from azure.ai.ml.entities._job.import_job import ImportJob
from azure.ai.ml.entities._job.pipeline.pipeline_job import PipelineJob
from azure.ai.ml.entities._job.sweep.sweep_job import SweepJob
from azure.ai.ml.entities._job.finetuning.finetuning_job import FineTuningJob

job_type: Optional[Type["Job"]] = None
type_in_override = find_type_in_override(params_override)
Expand Down Expand Up @@ -293,9 +293,9 @@ def _from_rest_object( # pylint: disable=too-many-return-statements
from azure.ai.ml.entities._builders.spark import Spark
from azure.ai.ml.entities._job.automl.automl_job import AutoMLJob
from azure.ai.ml.entities._job.base_job import _BaseJob
from azure.ai.ml.entities._job.finetuning.finetuning_job import FineTuningJob
from azure.ai.ml.entities._job.import_job import ImportJob
from azure.ai.ml.entities._job.sweep.sweep_job import SweepJob
from azure.ai.ml.entities._job.finetuning.finetuning_job import FineTuningJob

try:
if isinstance(obj, Run):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ def __init__(
*,
delay_evaluation: int = 0,
evaluation_interval: int = 0,
slack_amount: Optional[float] = 0,
slack_factor: Optional[float] = 0,
slack_amount: float = 0,
slack_factor: float = 0,
) -> None:
super().__init__(delay_evaluation=delay_evaluation, evaluation_interval=evaluation_interval)
self.type = EarlyTerminationPolicyType.BANDIT.lower()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
from azure.ai.ml._restclient.v2023_04_01_preview import AzureMachineLearningWorkspaces as ServiceClient022023Preview
from azure.ai.ml._restclient.v2023_04_01_preview.models import JobBase, ListViewType, UserIdentity
from azure.ai.ml._restclient.v2023_08_01_preview.models import JobType as RestJobType
from azure.ai.ml._restclient.v2024_01_01_preview.models import JobType as RestJobType_20240101
from azure.ai.ml._restclient.v2024_01_01_preview.models import JobBase as JobBase_2401
from azure.ai.ml._restclient.v2024_01_01_preview.models import JobType as RestJobType_20240101
from azure.ai.ml._scope_dependent_operations import (
OperationConfig,
OperationsContainer,
Expand Down Expand Up @@ -72,8 +72,8 @@
from azure.ai.ml.entities._datastore._constants import WORKSPACE_BLOB_STORE
from azure.ai.ml.entities._inputs_outputs import Input
from azure.ai.ml.entities._job.automl.automl_job import AutoMLJob
from azure.ai.ml.entities._job.finetuning.finetuning_job import FineTuningJob
from azure.ai.ml.entities._job.base_job import _BaseJob
from azure.ai.ml.entities._job.finetuning.finetuning_job import FineTuningJob
from azure.ai.ml.entities._job.import_job import ImportJob
from azure.ai.ml.entities._job.job import _is_pipeline_child_job
from azure.ai.ml.entities._job.parallel.parallel_job import ParallelJob
Expand Down Expand Up @@ -365,7 +365,7 @@ def get(self, name: str) -> Job:

@distributed_trace
@monitor_with_telemetry_mixin(logger, "Job.ShowServices", ActivityType.PUBLICAPI)
def show_services(self, name: str, node_index: int = 0) -> Optional[Dict]:
def show_services(self, name: str, node_index: int = 0) -> Optional[Dict[str, ServiceInstance]]:
"""Gets services associated with a job's node.

:param name: The name of the job.
Expand Down