Skip to content

Conversation

@arazig
Copy link

@arazig arazig commented Apr 15, 2025

Traceback (most recent call last):
File "/opt/conda/lib/python3.12/site-packages/mlflow/pyfunc/utils/data_validation.py", line 165, in _get_func_info_if_type_hint_supported
_infer_schema_from_list_type_hint(type_hint)
File "/opt/conda/lib/python3.12/site-packages/mlflow/types/type_hints.py", line 395, in _infer_schema_from_list_type_hint
internal_type = _get_element_type_of_list_type_hint(type_hint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.12/site-packages/mlflow/types/type_hints.py", line 358, in _get_element_type_of_list_type_hint
raise InvalidTypeHintException(
mlflow.types.type_hints.InvalidTypeHintException: Type hint typing.List doesn't contain a collection element type. Fix by adding an element type to the collection type definition, e.g. list[str] instead of list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant