Skip to content

Commit 9158ab2

Browse files
committed
Updates to preprocess function
1 parent d73f6b6 commit 9158ab2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/sasctl/pzmm/import_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def import_model(
213213
target_values: Optional[List[str]] = None,
214214
overwrite_project_properties: Optional[bool] = False,
215215
target_index: Optional[int] = None,
216-
preprocess_function: Optional[Callable[DataFrame, DataFrame]] = None,
216+
preprocess_function: Optional[Callable[[DataFrame], DataFrame]] = None,
217217
**kwargs,
218218
) -> Tuple[RestObj, Union[dict, str, Path]]:
219219
"""

src/sasctl/pzmm/write_score_code.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def write_score_code(
3636
score_cas: Optional[bool] = True,
3737
score_code_path: Union[Path, str, None] = None,
3838
target_index: Optional[int] = None,
39-
preprocess_function: Optional[Callable[DataFrame, DataFrame]] = None,
39+
preprocess_function: Optional[Callable[[DataFrame], DataFrame]] = None,
4040
**kwargs,
4141
) -> Union[dict, None]:
4242
"""
@@ -763,7 +763,7 @@ def _predict_method(
763763
missing_values: Optional[Any] = None,
764764
statsmodels_model: Optional[bool] = False,
765765
tf_model: Optional[bool] = False,
766-
preprocess_function: Optional[Callable[DataFrame, DataFrame]] = None,
766+
preprocess_function: Optional[Callable[[DataFrame], DataFrame]] = None,
767767
) -> None:
768768
"""
769769
Write the model prediction section of the score code.
@@ -2260,7 +2260,7 @@ def _viya35_score_code_import(
22602260
mr.update_model(model)
22612261
return mas_code, cas_code
22622262

2263-
def _add_preprocess_code(self, preprocess_function: Callable[DataFrame, DataFrame]):
2263+
def _add_preprocess_code(self, preprocess_function: Callable[[DataFrame], DataFrame]):
22642264
"""
22652265
Places the given preprocess function, which must both take a DataFrame as an argument
22662266
and return a DataFrame, into the score code. If the preprocess function does not

0 commit comments

Comments
 (0)