Skip to content

Commit 557c2d3

Browse files
committed
fix: typing
1 parent 60b0acb commit 557c2d3

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

src/sagemaker/jumpstart/factory/utils.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,17 @@
2424
JumpStartModelInitKwargs,
2525
)
2626

27+
KwargsType = Union[
28+
JumpStartModelDeployKwargs,
29+
JumpStartModelInitKwargs,
30+
JumpStartEstimatorFitKwargs,
31+
JumpStartEstimatorInitKwargs,
32+
JumpStartEstimatorDeployKwargs,
33+
]
34+
2735

2836
def get_model_info_kwargs(
29-
kwargs: Union[
30-
JumpStartModelDeployKwargs,
31-
JumpStartModelInitKwargs,
32-
JumpStartEstimatorFitKwargs,
33-
JumpStartEstimatorInitKwargs,
34-
JumpStartEstimatorDeployKwargs,
35-
],
37+
kwargs: KwargsType,
3638
include_config_name: bool = True,
3739
) -> dict:
3840
"""Returns a dictionary of model info kwargs to use with JumpStart APIs."""
@@ -53,15 +55,7 @@ def get_model_info_kwargs(
5355
return kwargs_dict
5456

5557

56-
def _set_temp_sagemaker_session_if_not_set(
57-
kwargs: Union[
58-
JumpStartModelDeployKwargs,
59-
JumpStartModelInitKwargs,
60-
JumpStartEstimatorFitKwargs,
61-
JumpStartEstimatorInitKwargs,
62-
JumpStartEstimatorDeployKwargs,
63-
]
64-
) -> Union[JumpStartModelInitKwargs, JumpStartModelDeployKwargs]:
58+
def _set_temp_sagemaker_session_if_not_set(kwargs: KwargsType) -> KwargsType:
6559
"""Sets a temporary sagemaker session if one is not set.
6660
6761
We need to create a default JS session (without custom user agent)

0 commit comments

Comments
 (0)