-
Notifications
You must be signed in to change notification settings - Fork 3
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
Convenience update #214
Convenience update #214
Conversation
…or that doesn't exist
…k into convenience_update
…k into convenience_update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LTGM. There was a CI failure, but once that's fixed, I would say it's good to merge.
I do worry a little bit that we raise exceptions when the group_name, confidence_threshold etc. are different than the existing detector. That sets the user up for a situation where their code works fine for a while, and then because of a change another user makes through the webapp, the code breaks. That said, I'm not sure what the right solution is. Perhaps:
- providing a value that differs from the existing detector's value updates that value
- don't include any of these parameters in this method. Have separate setter methods for these values (like how we already have one for setting the detector confidence)
Of the two options, I would probably vote for the first.
src/groundlight/client.py
Outdated
@@ -256,8 +258,12 @@ def create_detector( # noqa: PLR0913 | |||
|
|||
:param query: the detector query | |||
|
|||
:param group_name: the detector group that the new detector should belong to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should add what None
defaults to, otherwise it seems like we wont set a group name if its not passed.
src/groundlight/client.py
Outdated
:param confidence_threshold: the confidence threshold | ||
|
||
:param patience_time: the patience time, or how long Groundlight should work to generate a confident answer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, what is the default?
…k into convenience_update
Adds a few new convenience parameters when setting up a detector. Specifically, we want users to be able to specify the group_name and the patience time