our stack:

zenml integration install label_studioYou will then need to obtain your Label Studio API key. This will give you access to the web annotation interface. (The following steps apply to a local instance of Label Studio, but feel free to obtain your API key directly from your deployed instance if that's what you are using.)

git clone https://github.com/HumanSignal/label-studio.git

cd label-studio

docker-compose up -d # starts label studio at http://localhost:8080

Then visit http://localhost:8080/ to log in, and then visit http://localhost:8080/user/account and get your Label Studio API key (from the upper right-hand corner). You will need it for the next step. Keep the Label Studio server running, because the ZenML Label Studio annotator will use it as the backend.

At this point you should register the API key under a custom secret name, making sure to replace the two parts in <> with whatever you choose:

zenml secret create label_studio_secrets --api_key="<your_label_studio_api_key>"

Then register your annotator with ZenML:

zenml annotator register label_studio --flavor label_studio --api_key="{{label_studio_secrets.api_key}}"

# for deployed instances of Label Studio, you can also pass in the URL as follows, for example:

# zenml annotator register label_studio --flavor label_studio --authentication_secret="<LABEL_STUDIO_SECRET_NAME>" --instance_url="<your_label_studio_url>" --port=80

When using a deployed instance of Label Studio, the instance URL must be specified without any trailing / at the end. You should specify the port, for example, port 80 for a standard HTTP connection. For a Hugging Face deployment (the easiest way to get going with Label Studio), please read the Hugging Face deployment documentation.

Finally, add all these components to a stack and set it as your active stack. For example:

zenml stack copy default annotation

zenml stack update annotation -a <YOUR_CLOUD_ARTIFACT_STORE>