Skip to content

Commit

Permalink
Fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-romero committed Oct 18, 2023
1 parent 35013f7 commit c661b67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 0 additions & 10 deletions docs/docs/building-applications/3-managing-confidence.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ Higher confidence also requires more labels, which increases labor costs.

:::

If you want to submit image queries without waiting for confidence to reach your detector's threshold, use the
`ask_ml` or `ask_async` methods. `ask_ml` will wait for the first available prediction from an ML model, but will not wait
for confident results via escalation to a human reviewer. `ask_async` will return immediately with a placeholder response,
and the user can poll `get_image_query` to see when the results are ready. In both cases, image queries which are below the desired confidence level will still be escalated for further analysis, and the results are incorporated as training data to improve your ML model, but your code will not wait for that to happen.


```python notest continuation

```

Or if you want to execute `submit_image_query` as fast as possible, set `wait=0`. You will either get the ML results or a placeholder response if the ML model hasn't finished executing. Image queries which are below the desired confidence level will still be escalated for further analysis, and the results are incorporated as training data to improve your ML model, but your code will not wait for that to happen.

```python notest continuation
Expand Down
5 changes: 3 additions & 2 deletions src/groundlight/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,10 @@ def ask_ml(
detector: Union[Detector, str],
image: Union[str, bytes, Image.Image, BytesIO, BufferedReader, np.ndarray],
wait: Optional[float] = None,
# human_review: Optional[str] = None,
) -> ImageQuery:
"""Evaluates an image with Groundlight, getting the first answer Groundlight can provide.
"""
Evaluates an image with Groundlight, getting the first answer Groundlight can provide.
:param detector: the Detector object, or string id of a detector like `det_12345`
:type detector: Detector or str
Expand Down

0 comments on commit c661b67

Please sign in to comment.