Skip to content

Commit 881273b

Browse files
committed
fix: pylint typing
1 parent e499bc6 commit 881273b

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

src/sagemaker/jumpstart/notebook_utils.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from __future__ import absolute_import
1515

1616
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
1818
from packaging.version import Version
1919
from sagemaker.jumpstart import accessors
2020
from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
@@ -145,14 +145,14 @@ def list_jumpstart_scripts(
145145

146146

147147
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,
156156
region: str = JUMPSTART_DEFAULT_REGION_NAME,
157157
accept_unsupported_models: bool = False,
158158
accept_old_models: bool = False,
@@ -162,42 +162,42 @@ def list_jumpstart_models(
162162
"""List models in JumpStart, and optionally apply filters to result.
163163
164164
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
167167
must use a script which is specified in this argument. Note: Using this
168168
filter will result in slow execution speed, as it requires making more
169169
http calls and parsing many metadata files. To-Do: store script
170170
information for all models in a single file.
171171
(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
174174
must use a task which is specified in this argument.
175175
(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
178178
must use a frameworks which is specified in this argument.
179179
(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
182182
must use a model id which is specified in this argument.
183183
(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
186186
must not use a script which is specified in this argument. Note: Using
187187
this filter will result in slow execution speed, as it requires making
188188
more http calls and parsing many metadata files. To-Do: store script
189189
information for all models in a single file.
190190
(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
193193
must not use a task which is specified in this argument.
194194
(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
197197
must not use a frameworks which is specified in this argument.
198198
(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
201201
must not use a model id which is specified in this argument.
202202
(Default: None).
203203
region (str): Optional. Region to use when fetching JumpStart metadata.

0 commit comments

Comments
 (0)