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

fix: improve tolerance for error handling multivariate anomaly detection #1991

Merged
merged 5 commits into from
Jun 28, 2023

Conversation

eisber
Copy link
Collaborator

@eisber eisber commented Jun 23, 2023

Related Issues/PRs

Improve error handling for multivariate anomaly detection

How is this patch tested?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.

@eisber
Copy link
Collaborator Author

eisber commented Jun 23, 2023

/azp run

@github-actions
Copy link

Hey @eisber 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Summary by GPT-4

The code changes in the MultivariateAnomalyDetection.scala file remove the conversion of the "errors" field to a sequence of DMAError objects and instead directly convert it to a JSON string. This change is made in two places: in the MADUtils object and in the SimpleFitMultivariateAnomaly class.

In the MultivariateAnomalyDetectorSchemas.scala file, the DMAError case class is modified to have optional fields for "code" and "message". This change allows for more flexibility when handling errors, as they may not always have a code or message associated with them.

Suggestions

No suggestions are needed as the changes in this PR seem appropriate.

@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2023

Codecov Report

Merging #1991 (b525a33) into master (1f495b4) will increase coverage by 0.00%.
The diff coverage is 50.00%.

@@           Coverage Diff           @@
##           master    #1991   +/-   ##
=======================================
  Coverage   87.01%   87.01%           
=======================================
  Files         306      306           
  Lines       16063    16062    -1     
  Branches      850      827   -23     
=======================================
  Hits        13977    13977           
+ Misses       2086     2085    -1     
Impacted Files Coverage Δ
...e/anomaly/MultivariateAnomalyDetectorSchemas.scala 59.25% <ø> (ø)
...gnitive/anomaly/MultivariateAnomalyDetection.scala 90.71% <50.00%> (+0.27%) ⬆️

@eisber
Copy link
Collaborator Author

eisber commented Jun 23, 2023

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -28,7 +28,7 @@ case class DMASummary(status: String,

object DMAError extends SparkBindings[DMAError]

case class DMAError(code: String, message: String)
case class DMAError(code: Option[String], message: Option[String])
Copy link
Collaborator

Choose a reason for hiding this comment

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

if this is unused can you remove?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's still used in DMASummary

@mhamilton723
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mhamilton723 mhamilton723 merged commit 0539752 into microsoft:master Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants