Skip to content

Commit

Permalink
Revert "Removed /python-sdk/ as the docs' base URL (#142)"
Browse files Browse the repository at this point in the history
This reverts commit 918205b.
  • Loading branch information
blaise-muhirwa committed Dec 13, 2023
1 parent 918205b commit 31bce7e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Groundlight Python SDK

Groundlight makes it simple to build reliable visual applications. Read the [full documentation here](https://code.groundlight.ai).
Groundlight makes it simple to build reliable visual applications. Read the [full documentation here](https://code.groundlight.ai/python-sdk/).

## Computer Vision powered by Natural Language

Expand Down Expand Up @@ -30,7 +30,7 @@ _Note: The SDK is currently in "beta" phase. Interfaces are subject to change in

Some more resources you might like:

- [Code Documentation](https://code.groundlight.ai/docs/getting-started)
- [Code Documentation](https://code.groundlight.ai/python-sdk/docs/getting-started)
- [Python SDK on PyPi](https://pypi.org/project/groundlight/) or [GitHub](https://github.com/groundlight/python-sdk)
- [Company](https://www.groundlight.ai/)
- [Login to Groundlight App](https://app.groundlight.ai/)
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ cd ..
make develop-docs-comprehensive
```

and then open [http://localhost:3000](http://localhost:3000).
and then open [http://localhost:3000/python-sdk](http://localhost:3000/python-sdk).


## Running docs tests
Expand Down
3 changes: 2 additions & 1 deletion docs/blog/2023-12-06-framegrab.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ hide_table_of_contents: false
---


<!-- truncate -->

At Groundlight, we continue to build infrastructure that allows our customers to easily use computer
vision without a pre-existing dataset for industrial inspection, retail analytics, mobile robotics, and
much more. We've built many features towards the goal of declarative computer vision, and today we are excited to
Expand All @@ -34,7 +36,6 @@ cameras or streams.

FrameGrab supports generic USB cameras, RTSP streams, Basler USB cameras, Basler GigE cameras, and Intel RealSense depth cameras.

<!-- truncate -->

## Grabbing Camera Frames

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api-reference/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ title: API Reference
hide_title: true
---

<meta http-equiv="refresh" content="0; url=/api-reference-docs/" />
<meta http-equiv="refresh" content="0; url=/python-sdk/api-reference-docs/" />
4 changes: 2 additions & 2 deletions docs/docs/building-applications/6-async-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sidebar_position: 5
Groundlight provides a simple interface for submitting asynchronous queries. This is useful for times in which the thread or process or machine submitting image queries is not the same thread or machine that will be retrieving and using the results. For example, you might have a forward deployed robot or camera that submits image queries to Groundlight, and a separate server that retrieves the results and takes action based on them. We will refer to these two machines as the **submitting machine** and the **retrieving machine**.

## Setup Submitting Machine
On the **submitting machine**, you will need to install the Groundlight Python SDK. Then you can submit image queries asynchronously using the `ask_async` interface (read the full documentation [here](pathname:///api-reference-docs/#groundlight.client.Groundlight.ask_async)). `ask_async` submits your query and returns as soon as the query is submitted. It does not wait for an answer to be available prior to returning to minimize the time your program spends interacting with Groundlight. As a result, the `ImageQuery` object `ask_async` returns lacks a `result` (the `result` field will be `None`). This is acceptable for this use case as the **submitting machine** is not interested in the result. Instead, the **submitting machine** just needs to communicate the `ImageQuery.id`s to the **retrieving machine** - this might be done via a database, a message queue, or some other mechanism. For this example, we assume you are using a database where you save the `ImageQuery.id` to it via `db.save(image_query.id)`.
On the **submitting machine**, you will need to install the Groundlight Python SDK. Then you can submit image queries asynchronously using the `ask_async` interface (read the full documentation [here](pathname:///python-sdk/api-reference-docs/#groundlight.client.Groundlight.ask_async)). `ask_async` submits your query and returns as soon as the query is submitted. It does not wait for an answer to be available prior to returning to minimize the time your program spends interacting with Groundlight. As a result, the `ImageQuery` object `ask_async` returns lacks a `result` (the `result` field will be `None`). This is acceptable for this use case as the **submitting machine** is not interested in the result. Instead, the **submitting machine** just needs to communicate the `ImageQuery.id`s to the **retrieving machine** - this might be done via a database, a message queue, or some other mechanism. For this example, we assume you are using a database where you save the `ImageQuery.id` to it via `db.save(image_query.id)`.

```python notest
from groundlight import Groundlight
Expand Down Expand Up @@ -54,7 +54,7 @@ while image_query_id is not None:
```

## Important Considerations
When you submit an image query asynchronously, ML prediction on your query is **not** instant. So attempting to retrieve the result immediately after submitting an async query will likely result in an `UNCLEAR` result as Groundlight is still processing your query. Instead, if your code needs a `result` synchronously we recommend using one of our methods with a polling mechanism to retrieve the result. You can see all of the interfaces available in the documentation [here](pathname:///api-reference-docs/#groundlight.client.Groundlight).
When you submit an image query asynchronously, ML prediction on your query is **not** instant. So attempting to retrieve the result immediately after submitting an async query will likely result in an `UNCLEAR` result as Groundlight is still processing your query. Instead, if your code needs a `result` synchronously we recommend using one of our methods with a polling mechanism to retrieve the result. You can see all of the interfaces available in the documentation [here](pathname:///python-sdk/api-reference-docs/#groundlight.client.Groundlight).

```python notest
from groundlight import Groundlight
Expand Down
6 changes: 3 additions & 3 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
url: "https://www.groundlight.ai",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
baseUrl: "/python-sdk/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
Expand Down Expand Up @@ -44,7 +44,7 @@ const config = {
sidebarPath: require.resolve("./sidebars.js"),
editUrl:
// Remove this to remove the "edit this page" links.
"https://github.com/groundlight/tree/main/docs/",
"https://github.com/groundlight/python-sdk/tree/main/docs/",
// the first "docs" is the branch
// the second "docs" is the subdir within the repo
// there will be a third one for real URLs. :)
Expand Down Expand Up @@ -99,7 +99,7 @@ const config = {
position: "left",
},
{
href: "pathname:///api-reference-docs/",
href: "pathname:///python-sdk/api-reference-docs/",
label: "API Reference",
position: "left",
},
Expand Down

0 comments on commit 31bce7e

Please sign in to comment.