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

Doc fix for create detector #316

Merged
merged 7 commits into from
Feb 21, 2025
Merged

Doc fix for create detector #316

merged 7 commits into from
Feb 21, 2025

Conversation

brandon-groundlight
Copy link
Collaborator

Quick fix to make the other create detector methods more easily discovered

@@ -207,6 +207,7 @@ def _verify_connectivity(self) -> None:
f"Error connecting to Groundlight using API token '{self.api_token_prefix}...'"
f" at endpoint '{self.endpoint}'. Endpoint might be invalid or unreachable? "
"Check https://status.groundlight.ai/ for service status."
f"Original Error was: {str(e)}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, this was going to go into a different PR but I accidentally got it here. Tom and Tim noticed that we should immediately return the error at this point

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Good change

@@ -384,7 +388,7 @@ def create_detector( # noqa: PLR0913
# Create a detector in a specific group
detector = gl.create_detector(
name="vehicle-counter",
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be named something different.

@@ -384,7 +388,7 @@ def create_detector( # noqa: PLR0913
# Create a detector in a specific group
detector = gl.create_detector(
name="vehicle-counter",
query="How many vehicles are in the parking lot?",
query="Are there vehicles are in the parking lot?",
group_name="parking-monitoring",
patience_time=60.0
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to include patience time in the example? Probably not right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't see why not, we make it a legal parameter on the function

@@ -361,6 +362,9 @@ def create_detector( # noqa: PLR0913
"""
Create a new Detector with a given name and query.

Counting and Multiclass detectors are in Beta, and can be created through the
ExperimentalApi via the `create_counting_detector` and `create_multiclass_detector` methods.
Copy link
Member

Choose a reason for hiding this comment

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

Is it obvious to a user how to find documentation on the experimental API? Should we include a link?

Copy link
Collaborator Author

@brandon-groundlight brandon-groundlight Feb 21, 2025

Choose a reason for hiding this comment

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

Does Sphinx let you do that? Let me look

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ooh, it does and it's really nice

@brandon-groundlight brandon-groundlight changed the title Doc fix caught by Avi Doc fix for create detector Feb 21, 2025
@brandon-groundlight brandon-groundlight merged commit 81e1e09 into main Feb 21, 2025
8 checks passed
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