ML command supports category_field parameter#3909
Conversation
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
|
This PR is stalled because it has been open for 30 days with no activity. |
|
LGTM |
|
@LantaoJin @qianheng-aws @yuancu Need other reviews. |
| String categoryField = | ||
| arguments.containsKey(CATEGORY_FIELD) | ||
| ? (String) arguments.get(CATEGORY_FIELD).getValue() | ||
| : null; |
There was a problem hiding this comment.
categoryField is null will throw NPE in generateCategorizedInputDataset
There was a problem hiding this comment.
How so? generateCategorizedInputDataset has null checking:
If we want, we can add a @Nullable annotation to that field to document that contract in the signature
There was a problem hiding this comment.
Oh, it depends on the what kind of Map it used, seems HashMap can handle null key for computeIfAbsent(key), but ConcurrentHashMap and other kinds of Map throws NPE.
|
This PR is stalled because it has been open for 2 weeks with no activity. |
|
This PR is stalled because it has been open for 2 weeks with no activity. |
|
@LantaoJin can you re-review? |
|
This PR is stalled because it has been open for 2 weeks with no activity. |
Signed-off-by: Binlong Gao <gbinlong@amazon.com> (cherry picked from commit 661cb8d)
Signed-off-by: Binlong Gao <gbinlong@amazon.com> (cherry picked from commit 661cb8d) Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Binlong Gao <gbinlong@amazon.com> Signed-off-by: Aaron Alvarez <aaarone@amazon.com>

Description
From the document of ML command, it shows that ml supports
category_fieldcommand, but actually it doesn't work. This PR makes ML command supports category_field parameter.Request:
Response:
Related Issues
#3406
Check List
--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.