|
20 | 20 | import os
|
21 | 21 | import re
|
22 | 22 | import copy
|
23 |
| -from typing import List, Dict, Optional, Union, Any |
| 23 | +from typing import Callable, List, Dict, Optional, Union, Any |
24 | 24 |
|
25 | 25 | import sagemaker
|
26 | 26 | from sagemaker import (
|
@@ -154,7 +154,7 @@ def __init__(
|
154 | 154 | image_uri: Optional[Union[str, PipelineVariable]] = None,
|
155 | 155 | model_data: Optional[Union[str, PipelineVariable, dict]] = None,
|
156 | 156 | role: Optional[str] = None,
|
157 |
| - predictor_cls: Optional[callable] = None, |
| 157 | + predictor_cls: Optional[Callable] = None, |
158 | 158 | env: Optional[Dict[str, Union[str, PipelineVariable]]] = None,
|
159 | 159 | name: Optional[str] = None,
|
160 | 160 | vpc_config: Optional[Dict[str, List[Union[str, PipelineVariable]]]] = None,
|
@@ -186,7 +186,7 @@ def __init__(
|
186 | 186 | It can be null if this is being used to create a Model to pass
|
187 | 187 | to a ``PipelineModel`` which has its own Role field. (default:
|
188 | 188 | None)
|
189 |
| - predictor_cls (callable[string, sagemaker.session.Session]): A |
| 189 | + predictor_cls (Callable[[string, sagemaker.session.Session], Any]): A |
190 | 190 | function to call to create a predictor (default: None). If not
|
191 | 191 | None, ``deploy`` will return the result of invoking this
|
192 | 192 | function on the created endpoint name.
|
@@ -1501,7 +1501,7 @@ def deploy(
|
1501 | 1501 | inference config or
|
1502 | 1502 | - If inference recommendation id is specified along with incompatible parameters
|
1503 | 1503 | Returns:
|
1504 |
| - callable[string, sagemaker.session.Session] or None: Invocation of |
| 1504 | + Callable[[string, sagemaker.session.Session], Any] or None: Invocation of |
1505 | 1505 | ``self.predictor_cls`` on the created endpoint name, if ``self.predictor_cls``
|
1506 | 1506 | is not None. Otherwise, return None.
|
1507 | 1507 | """
|
@@ -1959,7 +1959,7 @@ def __init__(
|
1959 | 1959 | role: Optional[str] = None,
|
1960 | 1960 | entry_point: Optional[str] = None,
|
1961 | 1961 | source_dir: Optional[str] = None,
|
1962 |
| - predictor_cls: Optional[callable] = None, |
| 1962 | + predictor_cls: Optional[Callable] = None, |
1963 | 1963 | env: Optional[Dict[str, Union[str, PipelineVariable]]] = None,
|
1964 | 1964 | name: Optional[str] = None,
|
1965 | 1965 | container_log_level: Union[int, PipelineVariable] = logging.INFO,
|
@@ -2012,7 +2012,7 @@ def __init__(
|
2012 | 2012 | >>> |----- test.py
|
2013 | 2013 |
|
2014 | 2014 | You can assign entry_point='inference.py', source_dir='src'.
|
2015 |
| - predictor_cls (callable[string, sagemaker.session.Session]): A |
| 2015 | + predictor_cls (Callable[[string, sagemaker.session.Session], Any]): A |
2016 | 2016 | function to call to create a predictor (default: None). If not
|
2017 | 2017 | None, ``deploy`` will return the result of invoking this
|
2018 | 2018 | function on the created endpoint name.
|
|
0 commit comments