Projects
Project
A Kognic project must first be set in order to create inputs. Projects are usually configured by the Kognic Professional Services team, during the Guideline Agreement Process (GAP) of a new client engagement.
List Projects
Projects can be listed either via the client in Python or via the kognicutil
CLI.
- Python
- kognicutil
projects = client.project.get_projects()
kognicutil projects
Batch
Input batches allow further grouping of inputs into smaller batches within a project. Specifying batch during the input creation is optional, and will otherwise be the latest open batch by default.
Batch Status
Status | Description |
---|---|
pending | Batch has been created but is still not fully configured by Kognic. Either during project setup or requested changes |
open | Batch is open for new inputs |
ready | Batch has been published and no longer open for new inputs. |
in-progress | Kognic has started annotation of inputs within the batch. |
completed | Annotations has been completed. |
Listing Batches
Batches within a project can be listed either via the client in Python or via the kognicutil
CLI.
- Python
- kognicutil
batches = client.project.get_project_batches(project="<project-external-id>")
kognicutil projects <project-external-id> --get-batches
Creating Batches
To create a new batch in the open
state within a project
project_batch = client.project.create_batch(
project="<project_external_id>",
batch="<batch_external_id>",
)
The newly created batch will contain the same Annotation Types as the latest batch by default.
This method has an optional flag publish_previous_batches
which defaults to False
. By setting this flag to
True
, as shown in the example below, all previous batches in the "open" state would be published and you
would no longer be able to upload new inputs to those batches.
You should therefore be certain that you no longer need to upload more inputs to the
previous batches if you use this flag.
project_batch = client.project.create_batch(
project="<project_external_id>",
batch="<batch_external_id>",
publish_previous_batches=True,
)
Kognic usually helps with creating batches before a client becomes autonomous, in order to avoid any confusion please contact Kognic before you start using this feature.
Publish Batch
project_batch = client.project.publish_batch(
project="<project_external_id>",
batch="<batch_external_id>",
)
When the input batch is published, the status of the batch will be set to "ready". Published batches are not open for new inputs any longer.
A project with multiple open batches will require you to specify which open batch to target
when creating new inputs, whereas a project with a single open batch will allow you omit the batch
parameter when
creating inputs.