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_r296523650
 
 

 ##########
 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.
 
 Review comment:
   I moved some of the java doc from `ParamInfo` here. See if it is clearer.
   ```
        /**
         * Check whether a value is set for the given {@code paramInfo}. A 
value is considered set in
         * the following cases:
         * <ul>
         *     <li>
         *         The given parameter has a value set in this Params, or
         *     </li>
         *     <li>
         *         The given parameter is optional and has a default value 
defined in the {@code paramInfo}
         *     </li>
         * </ul>
         *
         * If this method returns false, {@link #get(ParamInfo)} will throw an 
exception.
         *
         * @return <tt>true</tt> if this params has a value set for the 
specified {@code paramInfo}, false otherwise.
         */
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to