Skip to content

Commit f8a2115

Browse files
Support credential-less fileshare datastore (#36392)
* support credential less file datastore via sdk/cli * update changelog * update docstring
1 parent 4d425f5 commit f8a2115

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

sdk/ml/azure-ai-ml/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Bugs Fixed
66
- Workspace update no longer broken for older workspaces due to deprecated tags.
7+
- Support credential-less fileshare datastore
78

89
## 1.18.0 (2024-07-09)
910

sdk/ml/azure-ai-ml/azure/ai/ml/_schema/_datastore/azure_storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class AzureFileSchema(AzureStorageSchema):
4242
[
4343
NestedField(AccountKeySchema),
4444
NestedField(SasTokenSchema),
45-
],
46-
required=True,
45+
NestedField(NoneCredentialsSchema),
46+
]
4747
)
4848

4949
@post_load

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_datastore/azure_storage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class AzureFileDatastore(Datastore):
4949
:type protocol: str
5050
:param properties: The asset property dictionary.
5151
:type properties: dict[str, str]
52-
:param credentials: Credentials to use for Azure ML workspace to connect to the storage.
52+
:param credentials: Credentials to use for Azure ML workspace to connect to the storage. Defaults to None.
5353
:type credentials: Union[~azure.ai.ml.entities.AccountKeyConfiguration,
5454
~azure.ai.ml.entities.SasTokenConfiguration]
5555
:param kwargs: A dictionary of additional configuration parameters.
@@ -67,7 +67,7 @@ def __init__(
6767
endpoint: str = _get_storage_endpoint_from_metadata(),
6868
protocol: str = HTTPS,
6969
properties: Optional[Dict] = None,
70-
credentials: Union[AccountKeyConfiguration, SasTokenConfiguration],
70+
credentials: Optional[Union[AccountKeyConfiguration, SasTokenConfiguration]] = None,
7171
**kwargs: Any
7272
):
7373
kwargs[TYPE] = DatastoreType.AZURE_FILE

0 commit comments

Comments
 (0)