Skip to content

Commit

Permalink
fix: Add howto work with setting when listing datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
frascuchon committed Jul 30, 2024
1 parent 5c38490 commit a95f69d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions argilla/docs/how_to_guides/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,18 @@ datasets = workspace.datasets
for dataset in datasets:
print(dataset)
```

When you list datasets, dataset settings are not preloaded, since this can introduce extra requests to the server. If you want to work with settings when listing datasets, you need to load them:
```python
import argilla as rg

client = rg.Argilla(api_url="<api_url>", api_key="<api_key>")

for dataset in client.datasets:
dataset.settings.get() # this will fetch the dataset settings
print(dataset.settings)
```

!!! tip "Notebooks"
When using a notebook, executing `client.datasets` will display a table with the `name`of the existing datasets, the `id`, `workspace_id` to which they belong, and the last update as `updated_at`. .

Expand Down

0 comments on commit a95f69d

Please sign in to comment.