14
14
from __future__ import absolute_import
15
15
16
16
from functools import cmp_to_key
17
- from typing import Any , Collection , List , Tuple , Union , Set , Dict
17
+ from typing import Any , List , Tuple , Union , Set , Dict
18
18
from packaging .version import Version
19
19
from sagemaker .jumpstart import accessors
20
20
from sagemaker .jumpstart .constants import JUMPSTART_DEFAULT_REGION_NAME
@@ -145,14 +145,14 @@ def list_jumpstart_scripts(
145
145
146
146
147
147
def list_jumpstart_models (
148
- script_allowlist : Union [str , Collection [str ]] = None ,
149
- task_allowlist : Union [str , Collection [str ]] = None ,
150
- framework_allowlist : Union [str , Collection [str ]] = None ,
151
- model_id_allowlist : Union [str , Collection [str ]] = None ,
152
- script_denylist : Union [str , Collection [str ]] = None ,
153
- task_denylist : Union [str , Collection [str ]] = None ,
154
- framework_denylist : Union [str , Collection [str ]] = None ,
155
- model_id_denylist : Union [str , Collection [str ]] = None ,
148
+ script_allowlist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
149
+ task_allowlist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
150
+ framework_allowlist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
151
+ model_id_allowlist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
152
+ script_denylist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
153
+ task_denylist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
154
+ framework_denylist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
155
+ model_id_denylist : Union [str , List [ str ], Set [ str ], Tuple [str ]] = None ,
156
156
region : str = JUMPSTART_DEFAULT_REGION_NAME ,
157
157
accept_unsupported_models : bool = False ,
158
158
accept_old_models : bool = False ,
@@ -162,42 +162,42 @@ def list_jumpstart_models(
162
162
"""List models in JumpStart, and optionally apply filters to result.
163
163
164
164
Args:
165
- script_allowlist (Union[str, Collection [str]] ): Optional. String or
166
- ``Collection`` storing scripts. All models returned by this function
165
+ script_allowlist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
166
+ list, set, or tuple storing scripts. All models returned by this function
167
167
must use a script which is specified in this argument. Note: Using this
168
168
filter will result in slow execution speed, as it requires making more
169
169
http calls and parsing many metadata files. To-Do: store script
170
170
information for all models in a single file.
171
171
(Default: None).
172
- task_allowlist (Union[str, Collection [str]] ): Optional. String or
173
- ``Collection`` storing tasks. All models returned by this function
172
+ task_allowlist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
173
+ list, set, or tuple storing tasks. All models returned by this function
174
174
must use a task which is specified in this argument.
175
175
(Default: None).
176
- framework_allowlist (Union[str, Collection [str]] ): Optional. String or
177
- ``Collection`` storing frameworks. All models returned by this function
176
+ framework_allowlist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
177
+ list, set, or tuple storing frameworks. All models returned by this function
178
178
must use a frameworks which is specified in this argument.
179
179
(Default: None).
180
- model_id_allowlist (Union[str, Collection [str]] ): Optional. String or
181
- ``Collection`` storing model ids. All models returned by this function
180
+ model_id_allowlist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
181
+ list, set, or tuple storing model ids. All models returned by this function
182
182
must use a model id which is specified in this argument.
183
183
(Default: None).
184
- script_denylist (Union[str, Collection [str]] ): Optional. String or
185
- ``Collection`` storing scripts. All models returned by this function
184
+ script_denylist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
185
+ list, set, or tuple storing scripts. All models returned by this function
186
186
must not use a script which is specified in this argument. Note: Using
187
187
this filter will result in slow execution speed, as it requires making
188
188
more http calls and parsing many metadata files. To-Do: store script
189
189
information for all models in a single file.
190
190
(Default: None).
191
- task_denylist (Union[str, Collection [str]] ): Optional. String or
192
- ``Collection`` storing tasks. All models returned by this function
191
+ task_denylist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
192
+ list, set, or tuple storing tasks. All models returned by this function
193
193
must not use a task which is specified in this argument.
194
194
(Default: None).
195
- framework_denylist (Union[str, Collection [str]] ): Optional. String or
196
- ``Collection`` storing frameworks. All models returned by this function
195
+ framework_denylist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
196
+ list, set, or tuple storing frameworks. All models returned by this function
197
197
must not use a frameworks which is specified in this argument.
198
198
(Default: None).
199
- model_id_denylist (Union[str, Collection [str]] ): Optional. String or
200
- ``Collection`` storing scripts . All models returned by this function
199
+ model_id_denylist (Union[str, List [str], Set[str], Tuple[str]] ): Optional. String,
200
+ list, set, or tuple storing model ids . All models returned by this function
201
201
must not use a model id which is specified in this argument.
202
202
(Default: None).
203
203
region (str): Optional. Region to use when fetching JumpStart metadata.
0 commit comments