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

Adding feature direction and moving suppression rules to each feature #960

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

amitgalitz
Copy link
Member

@amitgalitz amitgalitz commented Dec 19, 2024

Description

  • Added feature direction capability to each feature so users can select if anomalies should only be considered if they actual values goes either above or below the expected value.
  • Moved suppressionRules into the feature creation and redesigned it,
  • Fixed a bug when we had multiple rules with negative values where the toast message was blank.
  • Additional slight wording changes on different form fields

Screenshot 2024-12-19 at 11 48 44 AM

Check List

  • New functionality includes testing.
    • All tests pass
  • [] New functionality has been documented.
  • 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.

@kaituo
Copy link
Collaborator

kaituo commented Dec 20, 2024

I manually tested your code and found two issues.

First, I tested bwc by creating a detector using cli. By default, every feature has two rules like

"rules": [
            {
                "action": "IGNORE_ANOMALY",
                "conditions": [
                    {
                        "feature_name": "deny max",
                        "threshold_type": "ACTUAL_OVER_EXPECTED_RATIO",
                        "operator": "LTE",
                        "value": 0.2
                    },
                    {
                        "feature_name": "deny max",
                        "threshold_type": "EXPECTED_OVER_ACTUAL_RATIO",
                        "operator": "LTE",
                        "value": 0.2
                    }
                ]
            }
        ]

But when I open the detector from UI, I can see only one rule:
Screenshot 2024-12-19 at 10 25 21 PM

Second, I am expecting that I cannot define a suppression rule from the opposite direction a user has selected. For example, when I select "Rise above expected value", I should not be able to see the "below the expected value" from the rule section. But I do see it:
Screenshot 2024-12-19 at 10 30 02 PM

@amitgalitz
Copy link
Member Author

I will address these issue, in addition, I missed on the part with the default rules, I will make sure we show them correctly in UI and also now for every detector with a feature direction we will have just that one default rule show along with the change on the UI so selection for only one shows.

@kaituo
Copy link
Collaborator

kaituo commented Dec 26, 2024

A few thoughts.

First, for every detector with a feature direction we will have just that two identical default rules show along with the change.
Screenshot 2024-12-26 at 9 55 13 AM

Second, current UX will overwrite my rules when I am playing around directions. For example, my double direction rules will not come back once I re-select "Deviation in any direction". Before cx click save, you have the original rules in record. You can restore them back, right?

Screenshot 2024-12-26 at 9 55 56 AM

Third, is it a good experience to change customers' rules when I change direction? For example, original rules are "above".

Screenshot 2024-12-26 at 9 58 47 AM

When I change to "below", both rules changed to "below":

Screenshot 2024-12-26 at 10 00 14 AM

Should we just hide the "above" rules?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants