lindong28 commented on code in PR #214: URL: https://github.com/apache/flink-ml/pull/214#discussion_r1115308117
########## flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/TransformerServable.java: ########## @@ -0,0 +1,47 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.flink.ml.servable.api; + +import org.apache.flink.annotation.PublicEvolving; +import org.apache.flink.ml.param.WithParams; + +/** + * A TransformerServable takes a DataFrame as input and produces a DataFrame as the result. It can + * be used to encode online inference computation logic. + * + * <p>NOTE: Every TransformerServable subclass should have a no-arg constructor. + * + * <p>NOTE: Every TransformerServable subclass should implement a static method with signature + * {@code static T load(String path) throws IOException;}, where {@code T} refers to the concrete + * subclass. This static method should instantiate a new TransformerServable instance based on the + * data read from the given path. + * + * @param <T> The class type of the TransformerServable implementation itself. + */ +@PublicEvolving +public interface TransformerServable<T extends TransformerServable<T>> extends WithParams<T> { + /** + * Applies the TransformerServable on the given input DataFrame and returns the result + * DataFrame. + * + * @param input the input data Review Comment: Do you mean to change it to `@param input The input data`? I am not sure whether it is the right stye to use. The examples provided in [1] [2] as well as the existing doc for e.g. `AlgoOperator#transform` uses the lower case character. And the usage is also inconsistent in Flink codebase. For example, `DataStream#transform` uses lower case character. How about we use the lower case for now and have a followup PR to change the existing Java doc later? [1] https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html [2] https://www.baeldung.com/javadoc -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org