-
Notifications
You must be signed in to change notification settings - Fork 61
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 feature attribution #296
Conversation
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
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.
overall looks good. sync'ed offline, may need to make minor adjustments to improve consistency.
<LineSeries | ||
id={"ExpectedValue"} | ||
name={"Expected Value"} | ||
color={"#0475a2"} |
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.
What is this color? Can you add a comment in the code about it somewhere? If supposed to be invisible, may need to find a way to always keep it consistent with the chart background, including if Dashboards is in dark mode or not
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.
It's a bluish color and shouldn't be invisible. I need to attend the UX office hour next Tuesday to get this color finalized.
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.
Ok - is there a way for you to work with them sooner? Concern is that 8/9 is scheduled as the final sanity testing day - see timeline opensearch-project/opensearch-build#2271
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.
sure, will reach out to them offline to draw an conclusion on this
public/pages/AnomalyCharts/components/FeatureChart/FeatureChart.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
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.
Overall ok with the current changes - have a couple days buffer for finishing up. Thanks for adding this!
Also, if you can clean up the PR description and add some screenshots of the changes in the chart that would be great. Or could rename this PR to specify that this is just adding the expected value and feature contribution to the anomaly result schema, and future PR to enable it in the charts. |
There's also some integ test failures - I'm assuming it is related to switching the default anomaly history tabs
|
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
|
||
const featureData = get(anomaly, `features`, {}) | ||
let featureAttributionList = [] as any[]; | ||
if (Array.isArray(contributionData)) { |
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.
when would contributions not be an array?
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.
when it's getting response by calling search result api route in stead of get detector result api route
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.
Not sure what you mean about get detector result api route. I see the parsing you've done in getAnomalyResults()
. Where does the parsing happen where it is an array instead?
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.
there's no parsing for that route because it's processed at receiving response stage. See line 964 in ad.ts file, a type was defined and returned with response data
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.
I'm still unsure when contributions would be an array. Even AnomalyResult
defines it as a map here
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.
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.
the data has been flattened before passing in - https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/pull/296/files#diff-45683a46376000d3a5181f2[…]457590f0212f08b208877beaR602
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
Signed-off-by: Jackie Han <jkhanjob@gmail.com>
…t have this field Signed-off-by: Jackie Han <jkhanjob@gmail.com>
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.
LGTM on my end, made sure to keep track of what needs to be refactored/cleaned up in next PR. Will check out if I need to review/approve again if you need to address more of Tyler's comments
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.
Overall LGTM, thanks for making the changes! Let's follow up on #296 (comment)
Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit d973b8e)
Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit d973b8e)
Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit d973b8e)
Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit d973b8e)
Signed-off-by: Jackie Han <jkhanjob@gmail.com> (cherry picked from commit d973b8e)
Description
[Describe what this change achieves]
UI changes:
Issues Resolved
opensearch-project/anomaly-detection#299
[List any issues this PR will resolve]
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.