Skip to content

Commit dc73ceb

Browse files
authored
feat: Add kwargs passthrough (#35553)
1 parent 8633144 commit dc73ceb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/operations/_index_operations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _azure_ai_assets(self) -> AzureAiAssetsClient042024:
9898
return self.__azure_ai_assets_client
9999

100100
@monitor_with_activity(ops_logger, "Index.CreateOrUpdate", ActivityType.PUBLICAPI)
101-
def create_or_update(self, index: Index) -> Index:
101+
def create_or_update(self, index: Index, **kwargs) -> Index:
102102
"""Returns created or updated index asset.
103103
104104
If not already in storage, asset will be uploaded to the workspace's default datastore.
@@ -154,12 +154,12 @@ def create_or_update(self, index: Index) -> Index:
154154

155155
return Index._from_rest_object(
156156
self._azure_ai_assets.indexes.create_or_update(
157-
name=index.name, version=index.version, body=index._to_rest_object()
157+
name=index.name, version=index.version, body=index._to_rest_object(), **kwargs
158158
)
159159
)
160160

161161
@monitor_with_activity(ops_logger, "Index.Get", ActivityType.PUBLICAPI)
162-
def get(self, name: str, *, version: Optional[str] = None, label: Optional[str] = None) -> Index:
162+
def get(self, name: str, *, version: Optional[str] = None, label: Optional[str] = None, **kwargs) -> Index:
163163
"""Returns information about the specified index asset.
164164
165165
:param str name: Name of the index asset.
@@ -193,7 +193,7 @@ def get(self, name: str, *, version: Optional[str] = None, label: Optional[str]
193193
error_type=ValidationErrorType.MISSING_FIELD,
194194
)
195195

196-
index_version_resource = self._azure_ai_assets.indexes.get(name=name, version=version)
196+
index_version_resource = self._azure_ai_assets.indexes.get(name=name, version=version, **kwargs)
197197

198198
return Index._from_rest_object(index_version_resource)
199199

@@ -202,7 +202,7 @@ def _get_latest_version(self, name: str) -> Index:
202202

203203
@monitor_with_activity(ops_logger, "Index.List", ActivityType.PUBLICAPI)
204204
def list(
205-
self, name: Optional[str] = None, *, list_view_type: ListViewType = ListViewType.ACTIVE_ONLY
205+
self, name: Optional[str] = None, *, list_view_type: ListViewType = ListViewType.ACTIVE_ONLY, **kwargs
206206
) -> Iterable[Index]:
207207
"""List all Index assets in workspace.
208208
@@ -221,6 +221,6 @@ def cls(rest_indexes: Iterable[RestIndex]) -> List[Index]:
221221
return [Index._from_rest_object(i) for i in rest_indexes]
222222

223223
if name is None:
224-
return self._azure_ai_assets.indexes.list_latest(cls=cls)
224+
return self._azure_ai_assets.indexes.list_latest(cls=cls, **kwargs)
225225

226-
return self._azure_ai_assets.indexes.list(name, list_view_type=list_view_type, cls=cls)
226+
return self._azure_ai_assets.indexes.list(name, list_view_type=list_view_type, cls=cls, **kwargs)

0 commit comments

Comments
 (0)