becketqin commented on a change in pull request #8776: [FLINK-12881][ml] Add 
more functionalities for ML Params and ParamInfo class
URL: https://github.com/apache/flink/pull/8776#discussion_r296518189
 
 

 ##########
 File path: 
flink-ml-parent/flink-ml-api/src/main/java/org/apache/flink/ml/api/misc/param/Params.java
 ##########
 @@ -93,18 +148,20 @@
         * @param <V>  the type of the specific parameter
         */
        public <V> void remove(ParamInfo<V> info) {
-               paramMap.remove(info.getName());
+               params.remove(info.getName());
+               for (String a : info.getAlias()) {
+                       params.remove(a);
+               }
        }
 
        /**
-        * Creates and returns a deep clone of this Params.
+        * Returns <tt>true</tt> if this params has the specified paramInfo.
         *
-        * @return a deep clone of this Params
+        * @return <tt>true</tt> if this params has the specified paramInfo.
         */
-       public Params clone() {
-               Params newParams = new Params();
-               newParams.paramMap.putAll(this.paramMap);
-               return newParams;
+       public <V> boolean contains(ParamInfo<V> paramInfo) {
 
 Review comment:
   The argument name is `info` everywhere else. Can we just use `info` instead 
of `paramInfo` here?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to