Skip to content

Commit 00ad240

Browse files
sdiazlorstrickvlAlexejPenner
authored
Update Argilla integration for v2.x SDK (#2915)
* update argilla version * Update flavor * update the ArgillaAnnotator * Update docs * fix formatting * Update docs/book/component-guide/annotators/argilla.md Co-authored-by: Alex Strick van Linschoten <[email protected]> * Update docs/book/component-guide/annotators/argilla.md Co-authored-by: Alex Strick van Linschoten <[email protected]> * update type hinting * update paragraph * fix: add deprecation validator * fix: use logger * Add argilla to list of ignored integrations * Update registration command --------- Co-authored-by: Alex Strick van Linschoten <[email protected]> Co-authored-by: Alexej Penner <[email protected]> Co-authored-by: Alexej Penner <[email protected]>
1 parent 8cc62fb commit 00ad240

File tree

8 files changed

+255
-114
lines changed

8 files changed

+255
-114
lines changed
Loading

docs/book/component-guide/annotators/annotators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The core parts of the annotation workflow include:
5555
### List of available annotators
5656

5757
For production use cases, some more flavors can be found in specific `integrations` modules. In terms of annotators,
58-
ZenML features integrations with `label_studio` and `pigeon`.
58+
ZenML features integrations with the following tools.
5959

6060
| Annotator | Flavor | Integration | Notes |
6161
|-----------------------------------------|----------------|----------------|----------------------------------------------------------------------|

docs/book/component-guide/annotators/argilla.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ description: Annotating data using Argilla.
44

55
# Argilla
66

7-
[Argilla](https://github.com/argilla-io/argilla) is an open-source data curation
8-
platform designed to enhance the development of both small and large language
9-
models (LLMs) and NLP tasks in general. It enables users to build robust
10-
language models through faster data curation using both human and machine
11-
feedback, providing support for each step in the MLOps cycle, from data labeling
12-
to model monitoring.
7+
[Argilla](https://github.com/argilla-io/argilla) is a collaboration tool for AI engineers and domain experts who need to build high-quality datasets for their projects. It enables users to build robust language models through faster data curation using both human and machine feedback, providing support for each step in the MLOps cycle, from data labeling to model monitoring.
138

149
![Argilla Annotator](../../.gitbook/assets/argilla_annotator.png)
1510

@@ -31,7 +26,7 @@ of Argilla as well as a deployed instance of Argilla. There is an easy way to
3126
deploy Argilla as a [Hugging Face
3227
Space](https://huggingface.co/docs/hub/spaces-sdks-docker-argilla), for
3328
instance, which is documented in the [Argilla
34-
documentation](https://docs.argilla.io/en/latest/getting_started/installation/deployments/huggingface-spaces.html).
29+
documentation](https://docs.argilla.io/latest/getting_started/quickstart/).
3530

3631
### How to deploy it?
3732

@@ -59,16 +54,16 @@ zenml secret create argilla_secrets --api_key="<your_argilla_api_key>"
5954
Then register your annotator with ZenML:
6055

6156
```shell
62-
zenml annotator register argilla --flavor argilla --authentication_secret=argilla_secrets
57+
zenml annotator register argilla --flavor argilla --authentication_secret=argilla_secrets --port=6900
6358
```
6459

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

7065
```shell
71-
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>}"}"
66+
zenml annotator register argilla --flavor argilla --authentication_secret=argilla_secrets --instance_url="https://[your-owner-name]-[your_space_name].hf.space" --headers='{"Authorization": "Bearer {[your_hugging_face_token]}"}'
7267
```
7368

7469
Finally, add all these components to a stack and set it as your active stack.
@@ -95,9 +90,8 @@ functionality via the ZenML SDK.
9590

9691
You can access information about the datasets you're using with the `zenml
9792
annotator dataset list`. To work on annotation for a particular dataset, you can
98-
run `zenml annotator dataset annotate <dataset_name>`. What follows is an
99-
overview of some key components to the Argilla integration and how it can be
100-
used.
93+
run `zenml annotator dataset annotate <dataset_name>`. This will open the Argilla
94+
web interface for you to start annotating the dataset.
10195

10296
#### Argilla Annotator Stack Component
10397

docs/mocked_libs.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,7 @@
229229
"xgboost",
230230
"argilla",
231231
"argilla.client",
232-
"argilla.client.client",
233-
"argilla.client.sdk",
234-
"argilla.client.sdk.commons",
235-
"argilla.client.sdk.commons.errors",
232+
"argilla._exceptions._api",
236233
"peewee",
237234
"prodigy",
238235
"prodigy.components",

scripts/install-zenml-dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ install_integrations() {
3636
# figure out the python version
3737
python_version=$(python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
3838

39-
ignore_integrations="feast label_studio bentoml seldon pycaret skypilot_aws skypilot_gcp skypilot_azure pigeon prodigy"
39+
ignore_integrations="feast label_studio bentoml seldon pycaret skypilot_aws skypilot_gcp skypilot_azure pigeon prodigy argilla"
4040

4141
# Ignore tensorflow and deepchecks only on Python 3.12
4242
if [ "$python_version" = "3.12" ]; then

src/zenml/integrations/argilla/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ArgillaIntegration(Integration):
2626

2727
NAME = ARGILLA
2828
REQUIREMENTS = [
29-
"argilla>=1.20.0,<2",
29+
"argilla>=2.0.0",
3030
]
3131

3232
@classmethod

0 commit comments

Comments
 (0)