Skip to content

Commit 151715c

Browse files
committed
typing update
1 parent 7239ef8 commit 151715c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/python/responsible-ai/text/responsibleaidashboard-text-classification-financial-news/responsibleaidashboard-text-classification-financial-news.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,8 @@
801801
"from ml_wrappers.common.warnings_suppressor import shap_warnings_suppressor\n",
802802
"from ml_wrappers.common.constants import ModelTask\n",
803803
"\n",
804+
"import typing\n",
805+
"\n",
804806
"with shap_warnings_suppressor():\n",
805807
" try:\n",
806808
" from shap import models\n",
@@ -835,7 +837,7 @@
835837
" \"to use WrappedTextClassificationModel.\")\n",
836838
" self._wrapped_model = models.TransformersPipeline(pipeline)\n",
837839
"\n",
838-
" def predict(self, context: mlflow.pyfunc.PythonModelContext, model_input: pd.DataFrame = None) -> list[int]:\n",
840+
" def predict(self, context: mlflow.pyfunc.PythonModelContext, model_input: list[typing.Optional[pd.core.frame.DataFrame]] = None) -> list[int]:\n",
839841
" if model_input is None:\n",
840842
" model_input = context # resolve positional inputs if only one arg passed\n",
841843
" \n",

0 commit comments

Comments
 (0)