Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/groundlight/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Contributor

Choose a reason for hiding this comment

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

Thanks! Good change

)
raise GroundlightClientError(msg) from e

Expand Down Expand Up @@ -361,6 +362,10 @@ 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 :meth:`ExperimentalApi.create_counting_detector` and
:meth:`ExperimentalApi.create_multiclass_detector` methods.

**Example usage**::

gl = Groundlight()
Expand All @@ -383,8 +388,8 @@ 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?",
name="vehicle-monitor",
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

)
Expand Down
Loading