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

Missing docs: how to modify warning and failure thresholds #2

Open
andreipopovici opened this issue Feb 9, 2024 · 3 comments
Open

Comments

@andreipopovici
Copy link

Hi there,

I'm trying to fine-tune and make the detection less sensitive. I see there's a THRESH constant of 0.08 in the Obico ML server.py, then there are a couple threshold-related number inputs in the HA integration, but those get set to something by the blueprint. I was under the mistaken assumption that we could set those inputs to our preferred values.

Is there a combination of changes I could make to achieve my goal?

Could you elaborate on how the server's THRESH constant relates to the return values from the ML server? Thank you!

@nberktumer
Copy link
Owner

Unfortunately I've hardcoded the failure thresholds in the automation calculations. It is possible to replace the hardcoded values with an input but need to go over the whole calculation functions.

I ported the following calculation functions to the HA blueprint. You can go over these functions and update the blueprint:
https://github.com/TheSpaghettiDetective/obico-server/blob/496605a62fcb790097c510c151994e9b2bf020c1/backend/lib/prediction.py

https://github.com/TheSpaghettiDetective/obico-server/blob/496605a62fcb790097c510c151994e9b2bf020c1/backend/app/models.py#L410

@andreipopovici
Copy link
Author

Thank you! I'll observe the normalized p values for a while to get a sense of why it's so sensitive.

To that end, I've added a warn mode that bypasses the pause/stop button presses: https://github.com/andreipopovici/ha-bambu-lab-p1-spaghetti-detection/blob/main/blueprints/spaghetti_detection.yaml#L50

@ForceConstant
Copy link

@andreipopovici thanks, the warn feature is useful for me.

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

No branches or pull requests

3 participants