Skip to content

Conversation

@darius-vil
Copy link

@darius-vil darius-vil commented Dec 23, 2025

Fixes #2888

@prodsecmachine
Copy link

prodsecmachine commented Dec 23, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@darius-vil darius-vil added the :ml label Dec 23, 2025
@darius-vil darius-vil changed the title Downgrade log severity for a batch of errors [ML] Downgrade log severity for a batch of errors Dec 23, 2025
@darius-vil darius-vil changed the title [ML] Downgrade log severity for a batch of errors [ML] Downgrade log severity for a batch of recoverable errors Dec 23, 2025
@darius-vil darius-vil requested a review from valeriy42 December 23, 2025 15:00
@darius-vil
Copy link
Author

Closes #2888

Copy link
Contributor

@edsavage edsavage left a comment

Choose a reason for hiding this comment

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

LGTM, just the one comment

Copy link
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

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

Great start @darius-vil ! 🚀 I left a few improvement suggestions.

Can you also please update the reporting of bad category error in lib/maths/common/CXMeansOnline1d.cc:468 as described in the issue #2888?

You can use a numerical error check along the lines of:

namespace {
bool isNumericalError(const std::exception& e) {
    // Check exception type
    if (dynamic_cast<const std::domain_error*>(&e) ||
        dynamic_cast<const std::overflow_error*>(&e) ||
        dynamic_cast<const std::underflow_error*>(&e)) {
        return true;
    }
    
    // Check message content as fallback
    std::string msg = e.what();
    return msg.find("boost::math") != std::string::npos ||
           msg.find("Scale parameter") != std::string::npos ||
           msg.find("must be > 0") != std::string::npos ||
           msg.find("-nan") != std::string::npos ||
           msg.find("-inf") != std::string::npos;
}
} 

@darius-vil darius-vil marked this pull request as ready for review January 7, 2026 11:29
@darius-vil darius-vil requested a review from valeriy42 January 9, 2026 13:02
Copy link
Contributor

@valeriy42 valeriy42 left a comment

Choose a reason for hiding this comment

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

LGTM. Great work! 👍

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.

[ML] Reduce Log Noise by Downgrading Recoverable Errors

4 participants