e --authentication_secret. For example, you'd run:zenml secret create argilla_secrets --api_key="<your_argilla_api_key>"

(Visit the Argilla documentation and interface to obtain your API key.)

Then register your annotator with ZenML:

zenml annotator register argilla --flavor argilla --authentication_secret=argilla_secrets

When using a deployed instance of Argilla, the instance URL must be specified without any trailing / at the end. If you are using a Hugging Face Spaces instance and its visibility is set to private, you must also set the extra_headers parameter which would include a Hugging Face token. For example:

zenml annotator register argilla --flavor argilla --authentication_secret=argilla_secrets --instance_url="https://[your-owner-name]-[your_space_name].hf.space" --extra_headers="{"Authorization": f"Bearer {<your_hugging_face_token>}"}"

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

zenml stack copy default annotation

# this must be done separately so that the other required stack components are first registered

zenml stack update annotation -an <YOUR_ARGILLA_ANNOTATOR>

zenml stack set annotation

# optionally also

zenml stack describe

Now if you run a simple CLI command like zenml annotator dataset list this should work without any errors. You're ready to use your annotator in your ML workflow!

How do you use it?

ZenML supports access to your data and annotations via the zenml annotator ... CLI command. We have also implemented an interface to some of the common Argilla functionality via the ZenML SDK.

You can access information about the datasets you're using with the zenml annotator dataset list. To work on annotation for a particular dataset, you can run zenml annotator dataset annotate <dataset_name>. What follows is an overview of some key components to the Argilla integration and how it can be used.

Argilla Annotator Stack Component