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

Set default min score for attributes labels to 0.7 #8001

Merged
merged 2 commits into from
Sep 30, 2023

Conversation

NickM-27
Copy link
Sponsor Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Sep 29, 2023

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit bf4cb25
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/65175924c349ad0008281aed

for attribute in ALL_ATTRIBUTE_LABELS:
if (
not config.objects.filters
or config.objects.filters.get(attribute, FilterConfig()).min_score == 0.5
Copy link
Owner

Choose a reason for hiding this comment

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

Won't this overwrite all their filters if they had specified a min_score of 0.5?

Copy link
Sponsor Collaborator Author

@NickM-27 NickM-27 Sep 29, 2023

Choose a reason for hiding this comment

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

yeah, if the filter was manually set to 0.5 it would get overwritten. The issue I am trying to figure out how to handle is the case where a user sets min_area for example but the default min_score shouldn't be affected by that and I think we'd still want it to be 0.7 in that case

Copy link
Sponsor Collaborator Author

Choose a reason for hiding this comment

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

So I'm basically assuming users won't want to set the min_score for an attribute to 0.5, there definitely may be a better approach but I can't find a good way to have the default_factory for a field be able to access the key from the dict for example. Because if we knew the label for that particular FilterConfig then the min_score could be automatic

@blakeblackshear blakeblackshear merged commit 9a4f970 into dev Sep 30, 2023
10 checks passed
@blakeblackshear blakeblackshear deleted the attribute-min-score branch September 30, 2023 12:38
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.

None yet

2 participants