From 31bce7e6e471929fc616b9ae1d011745989b5718 Mon Sep 17 00:00:00 2001 From: blaise-muhirwa Date: Wed, 13 Dec 2023 15:48:04 -0800 Subject: [PATCH] Revert "Removed `/python-sdk/` as the docs' base URL (#142)" This reverts commit 918205b2ba36d7aff8fdcb436fa3361c7376c6d7. --- README.md | 4 ++-- docs/README.md | 2 +- docs/blog/2023-12-06-framegrab.md | 3 ++- docs/docs/api-reference/api-reference.md | 2 +- docs/docs/building-applications/6-async-queries.md | 4 ++-- docs/docusaurus.config.js | 6 +++--- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f211e4f7..7b7161d2 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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/) diff --git a/docs/README.md b/docs/README.md index 850a7d81..40251b6a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 diff --git a/docs/blog/2023-12-06-framegrab.md b/docs/blog/2023-12-06-framegrab.md index d49a8aee..29b39a7a 100644 --- a/docs/blog/2023-12-06-framegrab.md +++ b/docs/blog/2023-12-06-framegrab.md @@ -26,6 +26,8 @@ hide_table_of_contents: false --- + + 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 @@ -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. - ## Grabbing Camera Frames diff --git a/docs/docs/api-reference/api-reference.md b/docs/docs/api-reference/api-reference.md index 93a77c4a..170b80f9 100644 --- a/docs/docs/api-reference/api-reference.md +++ b/docs/docs/api-reference/api-reference.md @@ -4,4 +4,4 @@ title: API Reference hide_title: true --- - \ No newline at end of file + \ No newline at end of file diff --git a/docs/docs/building-applications/6-async-queries.md b/docs/docs/building-applications/6-async-queries.md index 289d0b34..3507f66e 100644 --- a/docs/docs/building-applications/6-async-queries.md +++ b/docs/docs/building-applications/6-async-queries.md @@ -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 @@ -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 diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 14a21f1c..b556b662 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -15,7 +15,7 @@ const config = { url: "https://www.groundlight.ai", // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' - baseUrl: "/", + baseUrl: "/python-sdk/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. @@ -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. :) @@ -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", },