-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-31127] Add public API classes for FLIP-289 #214
Conversation
0e031e6
to
013b406
Compare
@jiangxin369 Can you help review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lindong28 Thanks for the PR, left some comments.
public interface ModelServable<T extends ModelServable<T>> extends TransformerServable<T> { | ||
|
||
/** Sets model data using the serialized model data from the given input stream. */ | ||
default T setModelData(InputStream modelData) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Since We need to support setModelData on
GraphModel
, shall we modify the parameter toInputStream... modelDatas
to support reading multiple model data from different Tables? - Since we usually need to read and deserialize the model data, we'd better add
throws IOException
in the method signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I agree we need to make setModelData() take multiple InputSreams. And we need to let these methods throw IOException.
I have updated the method to the this:
default T setModelData(InputStream... modelDataInputs) throws IOException
I will send an email update to the voting thread when this PR is mostly ready for merge.
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/DataFrame.java
Outdated
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/DataFrame.java
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/DataFrame.java
Show resolved
Hide resolved
013b406
to
1a338d7
Compare
@jiangxin369 Thanks for the review. Can you take another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lindong28 Thanks for the updates. LGTM overall only left 2 minor comments.
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/ModelServable.java
Outdated
Show resolved
Hide resolved
7026130
to
657ed66
Compare
@zhipeng93 Can you help review this PR? If this PR looks good to you, I will need to send an email to the FLIP-289 voting thread to discuss the following API change before this PR is merged. Update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Left some comments below.
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/DataFrame.java
Outdated
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/DataFrame.java
Outdated
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/DataFrame.java
Outdated
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/ModelServable.java
Outdated
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/api/TransformerServable.java
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/types/MatrixType.java
Show resolved
Hide resolved
flink-ml-servable-core/src/main/java/org/apache/flink/ml/servable/types/MatrixType.java
Outdated
Show resolved
Hide resolved
@zhipeng93 Thanks for the review. Can you help take another look? |
657ed66
to
d59e3e5
Compare
Thanks for the update. LGTM. |
Hi, I just found we have made this change. I have a question: how do we obtain the corresponding input stream for each It seems additional parameters are required in the signature of |
IMO, indeed we need to map |
If not specifying the mapping in this method, we may need another public API to obtain the orders of |
@Fanoid we will need to add extra APIs in GraphBuilder and extra class GraphModelServable in order to compose multiple Estimator/Transformer into one Servable. We can obtain the input stream for |
@lindong28 Thanks for your explanation. I missed the point that we already have the orders in the |
Thanks @zhipeng93 @Fanoid @jiangxin369 for the review. |
This closes apache#214.
This closes apache#214.
What is the purpose of the change
Add public API classes for FLIP-289 with the exception specified below.
Brief change log
Added most public API classes specified in FLIP-289.
The following class and methods are not added:
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: yesDocumentation