You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. List any
dependencies that are required for this change. -->
This PR adds support to configure the task distribution strategy when
creating or updating datasets.
We can create datasets with specific task distribution setup
```python
task_distribution = TaskDistribution(min_submitted=4)
settings = Settings(
fields=[TextField(name="text", title="text")],
questions=[LabelQuestion(name="label", title="text", labels=["positive", "negative"])],
distribution=task_distribution,
)
dataset = Dataset(dataset_name, settings=settings).create()
```
or update an existing dataset (without any user response)
```python
dataset = client.datasets(...)
dataset.settings.distribution.min_submitted = 100
# or
dataset.distribution.min_submitted = 100
# or
dataset.distribution = TaskDistribution(min_submitted=100)
dataset.update()
```
Closes#5033Closes#5034
Refs: #5246
**Type of change**
<!-- Please delete options that are not relevant. Remember to title the
PR according to the type of change -->
- New feature (non-breaking change which adds functionality)
- Improvement (change adding some improvement to an existing
functionality)
**How Has This Been Tested**
<!-- Please add some reference about how your feature has been tested.
-->
**Checklist**
<!-- Please go over the list and make sure you've taken everything into
account -->
- I added relevant documentation
- I followed the style guidelines of this project
- I did a self-review of my code
- I made corresponding changes to the documentation
- I confirm My changes generate no new warnings
- I have added tests that prove my fix is effective or that my feature
works
- I have added relevant notes to the CHANGELOG.md file (See
https://keepachangelog.com/)
---------
Co-authored-by: José Francisco Calvo <jose@argilla.io>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Damián Pumar <damianpumar@gmail.com>
Co-authored-by: José Francisco Calvo <josefranciscocalvo@gmail.com>
Co-authored-by: Leire <leire@argilla.io>
Co-authored-by: David Berenstein <david.m.berenstein@gmail.com>
Co-authored-by: Natalia Elvira <126158523+nataliaElv@users.noreply.github.com>
Co-authored-by: Sara Han <127759186+sdiazlor@users.noreply.github.com>
No description provided.
The text was updated successfully, but these errors were encountered: