weibozhao commented on code in PR #135:
URL: https://github.com/apache/flink-ml/pull/135#discussion_r935265005


##########
flink-ml-python/pyflink/ml/core/param.py:
##########
@@ -86,6 +87,8 @@ def get_param_map(self) -> Dict['Param[Any]', Any]:
     @staticmethod
     def _is_compatible_type(param: 'Param[V]', value: V) -> bool:
         if value is not None and param.type != type(value):
+            if type(value).__name__ == 'DenseVector' or type(value).__name__ 
== 'SparseVector':
+                return issubclass(type(value), param.type)

Review Comment:
   In the Java code, using `param.clazz.isAssignableFrom(value.getClass())` to 
check the compatible. 
   But in the python code, type and class are different.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to