Skip to content

Commit

Permalink
Address comments from API review: **kwargs pass through; make keyword…
Browse files Browse the repository at this point in the history
… arguments keyword-only (#34467) (#39597)

* Remove **_kwargs and make keyword arguments keyword-only

* Update docstring: ":keyword"

* Add **kwargs

Co-authored-by: Zhaoyang Li <[email protected]>
  • Loading branch information
jayesh-tanna and lizy14 authored Feb 6, 2025
1 parent d0d9a35 commit 8bd66a7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions sdk/ml/azure-ai-ml/azure/ai/ml/operations/_data_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,24 +750,25 @@ def share(
def mount(
self,
path: str,
*,
mount_point: Optional[str] = None,
mode: str = "ro_mount",
debug: bool = False,
persistent: bool = False,
**_kwargs,
**kwargs,
) -> None:
"""Mount a data asset to a local path, so that you can access data inside it
under a local path with any tools of your choice.
:param path: The data asset path to mount, in the form of `azureml:<name>` or `azureml:<name>:<version>`.
:type path: str
:param mount_point: A local path used as mount point.
:keyword mount_point: A local path used as mount point.
:type mount_point: str
:param mode: Mount mode. Only `ro_mount` (read-only) is supported for data asset mount.
:keyword mode: Mount mode. Only `ro_mount` (read-only) is supported for data asset mount.
:type mode: str
:param debug: Whether to enable verbose logging.
:keyword debug: Whether to enable verbose logging.
:type debug: bool
:param persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
:keyword persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
where the 'CI_NAME' environment variable is set."
:type persistent: bool
:return: None
Expand Down Expand Up @@ -809,6 +810,7 @@ def mount(
)
],
api_version="2021-01-01",
**kwargs,
)
print(f"Mount requested [name: {mount_name}]. Waiting for completion ...")
while True:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,24 +241,25 @@ def create_or_update(self, datastore: Datastore) -> Datastore: # type: ignore
def mount(
self,
path: str,
*,
mount_point: Optional[str] = None,
mode: str = "ro_mount",
debug: bool = False,
persistent: bool = False,
**_kwargs,
**kwargs,
) -> None:
"""Mount a datastore to a local path, so that you can access data inside it
under a local path with any tools of your choice.
:param path: The data store path to mount, in the form of `<name>` or `azureml://datastores/<name>`.
:type path: str
:param mount_point: A local path used as mount point.
:keyword mount_point: A local path used as mount point.
:type mount_point: str
:param mode: Mount mode, either `ro_mount` (read-only) or `rw_mount` (read-write).
:keyword mode: Mount mode, either `ro_mount` (read-only) or `rw_mount` (read-write).
:type mode: str
:param debug: Whether to enable verbose logging.
:keyword debug: Whether to enable verbose logging.
:type debug: bool
:param persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
:keyword persistent: Whether to persist the mount after reboot. Applies only when running on Compute Instance,
where the 'CI_NAME' environment variable is set."
:type persistent: bool
:return: None
Expand Down Expand Up @@ -300,6 +301,7 @@ def mount(
)
],
api_version="2021-01-01",
**kwargs,
)
print(f"Mount requested [name: {mount_name}]. Waiting for completion ...")
while True:
Expand Down

0 comments on commit 8bd66a7

Please sign in to comment.