Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Update dataset settings #5254

Merged
merged 9 commits into from
Jul 18, 2024
95 changes: 72 additions & 23 deletions argilla/docs/how_to_guides/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,36 +446,85 @@ dataset_exist = dataset is not None

## Update a dataset

You can update a dataset by calling the `update` method on the `Dataset` class and passing the new settings as an argument.

!!! note
Keep in mind that once your dataset is published, only the guidelines can be updated.
Once a dataset is published, there are limited things you can update. Here is a summary of the attributes you can change:

=== "Fields"
| Attributes | From SDK | From UI |
| ---- | ----- | -------------- |
|Name|❌|❌|
|Title|✅|✅|
|Required|❌|❌|
|Use markdown|✅|✅|

=== "Questions"
| Attributes | From SDK | From UI |
| ---- | ----- | -------------- |
|Name|❌|❌|
|Title|❌|✅|
|Description|❌|✅|
|Required|❌|❌|
|Labels|❌|❌|
|Values|❌|❌|
|Label order|❌|✅|
|Suggestions first|❌|✅|
|Visible labels|❌|✅|
|Field|❌|❌|
|Allow overlapping|❌|❌|
|Use markdown|❌|✅|

=== "Metadata"
| Attributes | From SDK | From UI |
| ---- | ----- | -------------- |
|Name|❌|❌|
|Title|✅|✅|
|Options|❌|❌|
|Minimum value|❌|❌|
|Maximum value|❌|❌|
|Visible for annotators|✅|✅|
|Allow extra metadata|✅|✅|


=== "Vectors"
| Attributes | From SDK | From UI |
| ---- | ----- | -------------- |
|Name|❌|❌|
|Title|✅|✅|
|Dimensions|❌|❌|

=== "Guidelines"
| From SDK | From UI |
| ----- | -------------- |
|✅|✅|

=== "Distribution"
| Attributes | From SDK | From UI |
| ---- | ----- | -------------- |
|Minimum submitted|✅*|✅*|

> \* Can be changed as long as the dataset doesn't have any responses.

To modify these attributes, you can simply set the new value of the attributes you wish to change and call the `update` method on the `Dataset` object.

```python
import argilla as rg
dataset = client.datasets("my_dataset")

client = rg.Argilla(api_url="<api_url>", api_key="<api_key>")
dataset.settings.fields["text"].use_markdown = True
dataset.settings.metadata["my_metadata"].visible_for_annotators = False

dataset_to_update = client.datasets(name="my_dataset")
dataset.update()
```

settings_to_update = rg.Settings(
guidelines="These are some updated guidelines.",
fields=[
rg.TextField(
name="text",
),
],
questions=[
rg.LabelQuestion(
name="label",
labels=["label_4", "label_5", "label_6"]
),
],
)
You can also add and delete metadata properties and vector fields using the `add` and `delete` methods:

```python
dataset = client.datasets("my_dataset")

dataset_to_update.settings = settings_to_update
# add
dataset.vectors.add(rg.VectorField(name="my_vector", dimensions=123))
dataset.update()

dataset_updated = dataset_to_update.update()
#delete
dataset.metadata["my_metadata"].delete()
```

## Delete a dataset
Expand Down
9 changes: 3 additions & 6 deletions argilla/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ description: Argilla is a **collaboration platform for AI engineers and domain e
hide: navigation
---

# Welcome to Argilla
# Welcome to Argilla 2.x

Argilla is a **collaboration platform for AI engineers and domain experts** that require **high-quality outputs, full data ownership, and overall efficiency**.

!!! SUCCESS "Welcome to Argilla 2.x!"
To skip the introductions and go directly to installing and creating your first dataset, see [Quickstart](getting_started/quickstart.md).

!!! DANGER "Looking for Argilla 1.x?"
Looking for documentation for Argilla 1.x? Visit the latest release [here](https://docs.argilla.io/en/latest/).
!!! INFO "Looking for Argilla 1.x?"
Looking for documentation for Argilla 1.x? Visit [the latest release](https://docs.argilla.io/en/latest/).

!!! NOTE "Migrate to Argilla 2.x"
Want to learn how to migrate from Argilla 1.x to 2.x? Take a look at our dedicated [Migration Guide](how_to_guides/migrate_from_legacy_datasets.md).
Expand Down
5 changes: 2 additions & 3 deletions docs/_source/getting_started/argilla.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
[Argilla](https://argilla.io) is an open-source data curation platform for LLMs. Using Argilla, everyone can build robust language models through faster data curation using both human and machine feedback. We provide support for each step in the MLOps cycle, from data labeling to model monitoring.

```{admonition} Argilla 2.x
:class: danger
We are announcing that Argilla 1.29 is the final minor release for Argilla 1.x. Although we will continue to release bug fixes for this version, we will neither be adding nor removing any functionalities. Instead, we will focus our efforts on Argilla 2.x. Argilla 1.29 will reach its end-of-life on June 20, 2025.
Looking for documentation for Argilla 2.x? Visit the docs [here](https://argilla-io.github.io/argilla/)!
:class: info
We are announcing that Argilla 1.29 is the final minor release for Argilla 1.x. Although we will continue to release bug fixes for this version, we will neither be adding nor removing any functionalities. Visit the [2.x docs](https://argilla-io.github.io/argilla/)!
```

<div class="social social--sidebar" style="margin-top: 1em; display: flex; justify-content: right; gap: 8px">
Expand Down
Loading