Skip to content
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

Add query based input into interfaces #25

Merged

Conversation

weicongs-amazon
Copy link
Contributor

Description

Add query based input into interfaces

Issues Resolved

[List any issues this PR will resolve]

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

* @param modelId the trained model id
* @param listener a listener to be notified of the result
*/
default void predict(String algorithm, List<MLParameter> parameters, DataFrame inputData, String modelId, ActionListener<DataFrame> listener) {
Copy link
Collaborator

@ylwu-amzn ylwu-amzn May 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a supported algorithm list? How about add the list or add the doc link in java doc , so the client can know the exact algorithm name they should use?
Another option is to add enum for support algorithm. So user can just use code like this SupportedMLAlgorithm.KMEANS easily without worrying about wrong algorithm name (kMeans, kmean, or k_means?), but maybe the list will be too long.

Copy link
Contributor Author

@weicongs-amazon weicongs-amazon May 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The built-in algorithms candidates are available in the first release For these, we plan to have official page to share the details of each algorithm. We can add that link into the java doc. One issue is created to track this change. #26

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the algorithm enum, we can have an enum for built-in algorithms, but for interface, String will be still used to support custom algorithms built by customers.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it's great that we will support custom algorithms. Then it make sense to use string here. Maybe another interface with enum as input is more friendly for users who use built-in algorithms.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment. Created issue to track this change. #28 Personally I prefer not providing enum interface, since it will increase some cognitive load to customers. Adding this enum in the javadoc of the interfaces should be good enough. But still open to change this.

Copy link
Collaborator

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the change!

Copy link

@zhanghg08 zhanghg08 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, thanks for the changes

@weicongs-amazon weicongs-amazon merged commit e682a4f into opensearch-project:develop May 7, 2021
@ylwu-amzn ylwu-amzn mentioned this pull request May 11, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants