filename
stringclasses 32
values | chunks
stringlengths 28
500
| repo_name
stringclasses 1
value |
---|---|---|
argilla/argilla/docs/how_to_guides/index.md | description: These are the how-to guides for the Argilla SDK. They provide step-by-step instructions for common scenarios, including detailed explanations and code samples.
hide: toc
How-to guides
These are the how-to guides for the Argilla SDK. They provide step-by-step instructions for common scenarios, including detailed explanations and code samples. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/index.md | __Manage users and credentials__
---
Learn what they are and how to manage (create, read and delete) [`Users`](user.md) in Argilla.
[:octicons-arrow-right-24: How-to guide](user.md)
- __Manage workspaces__
---
Learn what they are and how to manage (create, read and delete) [`Workspaces`](workspace.md) in Argilla.
[:octicons-arrow-right-24: How-to guide](workspace.md)
- __Manage and create datasets__
--- | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/index.md | Learn what they are and how to manage (create, read and delete) [`Datasets`](dataset.md) and customize them using the `Settings` for `Fields`, `Questions`, `Metadata` and `Vectors`.
[:octicons-arrow-right-24: How-to guide](dataset.md)
- __Add, update, and delete records__
---
Learn what they are and how to add, update and delete the values for a [`Record`](record.md), which are made up of `Metadata`, `Vectors`, `Suggestions` and `Responses`. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/index.md | [:octicons-arrow-right-24: How-to guide](record.md)
- __Query, filter and export records__
---
Learn how to query and filter a `Dataset` and export their `Records`.
[:octicons-arrow-right-24: How-to guide](query_export.md)
- __Migrate to Argilla V2__
---
Learn how to migrate your legacy datasets from Argilla 1.x to 2.x.
[:octicons-arrow-right-24: How-to guide](migrate_from_legacy_datasets.md) | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | description: In this section, we will provide a step-by-step guide to show how to manage users and their credentials. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | User management
This guide provides an overview of user roles and credentials, explaining how to set up and manage users in Argilla.
A user in Argilla is an authorized person, who depending on their role, can use the Python SDK and access the UI in a running Argilla instance. We differentiate between three types of users depending on their role, permissions and needs: owner, admin and annotator. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | === "Overview"
| | Owner | Admin | Annotator |
|-------------------------------|------------|---------------------------|-----------|
| Number | Unlimited | Unlimited | Unlimited |
| Create and delete workspaces | Yes | No | No |
| Assign users to workspaces | Yes | No | No | | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | | Create, configure, update, and delete datasets | Yes | Only within assigned workspaces | No |
| Create, update, and delete users | Yes | No | No |
| Provide feedback with Argila UI | Yes | Yes | Yes | | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | === "Owner"
=== "Admin"
=== "Annotator"
??? Question "Question: Who can manage users?"
Default users and credentials
Argilla provides a default user with the owner role to help you get started in Python and the UI. The credentials for this user vary depending on the server configuration. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | Environment Username Password API Key Quickstart Docker and HF Space owner 12345678 owner.apikey Server image argilla 1234 argilla.apikey | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | !!! info "Main Class"
Get current user
To ensure you're using the correct credentials for managing users, you can get the current user in Argilla using the me attribute of the Argilla class.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
current_user = client.me
``` | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | Create a user
To create a new user in Argilla, you can define it in the User class and then call the create method. This method is inherited from the Resource base class and operates without modifications.
```python
import argilla as rg | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | client = rg.Argilla(api_url="", api_key="")
user_to_create = rg.User(
username="my_username",
password="12345678",
client=client
)
created_user = user_to_create.create()
``
!!! tip "Accessing attributes"
Access the attributes of a user by calling them directly on theUserobject. For example,user.idoruser.username`. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | List users
You can list all the existing users in Argilla by accessing the users attribute on the Argilla class and iterating over them. You can also use len(client.users) to get the number of users.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
users = client.users
for user in users:
print(user)
``
!!! tip "Notebooks"
When using a notebook, executingclient.userswill display a table withusername,id,role, and the last update asupdated_at`. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | Retrieve a user
You can retrieve an existing user from Argilla by accessing the users attribute on the Argilla class and passing the username as an argument.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
retrieved_user = client.users("my_username")
``` | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | List users in a workspace
You can list all the users in a workspace by accessing the users attribute on the Workspace class and iterating over them. You can also use len(workspace.users) to get the number of users by workspace.
For further information on how to manage workspaces, check this how-to guide.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
workspace = client.workspaces('my_workspace')
for user in workspace.users:
print(user)
``` | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | Add a user to a workspace
You can add an existing user to a workspace in Argilla by calling the add_to_workspace method on the User class.
For further information on how to manage workspaces, check this how-to guide.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
user = client.users('my_username')
workspace = client.workspaces('my_workspace')
added_user = user.add_to_workspace(workspace)
``` | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | Remove a user from a workspace
You can remove an existing user from a workspace in Argilla by calling the remove_from_workspace method on the User class.
For further information on how to manage workspaces, check this how-to guide.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
user = client.users('my_username')
workspace = client.workspaces('my_workspace')
removed_user = user.remove_from_workspace(workspace)
``` | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/user.md | Delete a user
You can delete an existing user from Argilla by calling the delete method on the User class.
```python
import argilla as rg
client = rg.Argilla(api_url="", api_key="")
user_to_delete = client.users('my_username')
deleted_user = user_to_delete.delete()
``` | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | description: In this section, we will provide a step-by-step guide to show how to annotate records in the UI.
Annotate your dataset
!!! note ""
To experience the UI features firsthand, you can take a look at the Demo ↗.
Argilla UI offers many functions to help you manage your annotation workflow, aiming to provide the most flexible approach to fit the wide variety of use cases handled by the community.
Annotation interface overview | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Flexible layout
The UI is responsive with two columns for larger devices and one column for smaller devices. This enables you to annotate data using your mobile phone for simple datasets (i.e., not very long text and 1-2 questions) or resize your screen to get a more compact UI.
=== "Header"
=== "Left pane"
This area displays the control panel on the top. The control panel is used for performing keyword-based search, applying filters, and sorting the results.
=== "Right pane" | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | === "Left bottom panel"
=== "Right bottom panel"
Shortcuts
The Argilla UI includes a range of shortcuts. For the main actions (submit, discard, save as draft and selecting labels) the keys are showed in the corresponding button.
To learn how to move from one question to another or between records using the keyboard, take a look at the table below.
Shortcuts provide a smoother annotation experience, especially with datasets using a single question (Label, MultiLabel, Rating, or Ranking). | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | ??? "Available shortcuts"
View by status
The view selector is set by default on Pending.
If you are starting an annotation effort, all the records are initially kept in the Pending view. Once you start annotating, the records will move to the other queues: Draft, Submitted, Discarded.
Pending: The records without a response.
Draft: The records with partial responses. They can be submitted or discarded later. You can’t move them back to the pending queue. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Discarded: The records may or may not have responses. They can be edited but you can’t move them back to the pending queue.
Submitted: The records have been fully annotated and have already been submitted. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Suggestions
If your dataset includes model predictions, you will see them represented by a sparkle icon ✨ in the label or value button. We call them “Suggestions” and they appear in the form as pre-filled responses. If confidence scores have been included by the dataset admin, they will be shown alongside with the label. Additionally, admins can choose to always show suggested labels at the beginning of the list. This can be configured from the dataset settings. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | If you agree with the suggestions, you just need to click on the Submit button, and they will be considered as your response. If the suggestion is incorrect, you can modify it and submit your final response.
Focus view | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | { width=10% height=10% }
This is the default view to annotate your dataset linearly, displaying one record after another.
!!! tip
You should use this view if you have a large number of required questions or need a strong focus on the record content to be labelled. This is also the recommended view for annotating a dataset sample to avoid potential biases introduced by using filters, search, sorting and bulk labelling. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Once you submit your first response, the next record will appear automatically. To see again your submitted response, just click on Prev.
Navigating through the records
To navigate through the records, you can use the Prev, shown as <, and Next, > buttons on top of the record card. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Each time the page is fully refreshed, the records with modified statuses (Pending to Discarded, Pending to Save as Draft, Pending to Submitted) are sent to the corresponding queue. The control panel displays the status selector, which is set to Pending by default.
Bulk view | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | { width=10% height=10% }
The bulk view is designed to speed up the annotation and get a quick overview of the whole dataset.
The bulk view displays the records in a vertical list. Once this view is active, some functions from the control panel will activate to optimize the view. You can define the number of records to display by page between 10, 25, 50, 100 and whether records are shown with a fixed (Collapse records) or their natural height (Expand records). | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | !!! tip
You should use this to quickly explore a dataset. This view is also recommended if you have a good understanding of the domain and want to apply your knowledge based on things like similarity and keyword search, filters, and suggestion score thresholds. For a datasets with a large number of required questions or very long fields, the focus view would be more suitable. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | !!! note
Please note that suggestions are not shown in bulk view (except for Spans) and that you will need to save as a draft when you are not providing responses to all required questions. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Annotation progress
The global progress of the annotation task from all users is displayed in the dataset list. This is indicated in the Global progress column, which shows the number of records still to be annotated, along with a progress bar. The progress bar displays the percentage and number of records submitted, conflicting (i.e., those with both submitted and discarded responses), discarded and pending by hovering your mouse over it. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | You can track your annotation progress in real time from the righ-bottom panel inside the dataset page. This means that, while you are annotating, the progress bar updates as you submit or discard a record. Expanding the panel, the distribution of Pending, Draft, Submitted and Discarded responses is displayed in a donut chart. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Use search, filters, and sort
The UI offers various features designed for data exploration and understanding. Combining these features with bulk labelling can save you and your team hours of time.
!!! tip
You should use this when you are familiar with your data and have large volumes to annotate based on verified beliefs and experience. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Search
From the control panel at the top of the left pane, you can search by keyword across the entire dataset. If you have more than one field in your records, you may specify if the search is to be performed “All” fields or on a specific one. Matched results are highlighted in color. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Order by record semantic similarity
You can retrieve records based on their similarity to another record if vectors have been added to the dataset.
!!! note
Check these guides to know how to add vectors to your dataset and records.
To use the search by semantic similarity function, click on Find similar within the record you wish to use as a reference. If multiple vectors are available, select the desired vector. You can also choose whether to retrieve the most or least similar records. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | The retrieved records are then ordered by similarity, with the similarity score displayed on each record card.
While the semantic search is active, you can update the selected vector or adjust the order of similarity, and specify the number of desired results.
To cancel the search, click on the cross icon next to the reference record.
Filter and sort by metadata, responses, and suggestions | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Filter
If the dataset contains metadata, responses and suggestions, click on Filter in the control panel to display the available filters. You can select multiple filters and combine them.
!!! note
Record info including metadata is visible from the ellipsis menu in the record card.
From the Metadata dropdown, type and select the property. You can set a range for integer and float properties, and select specific values for term metadata. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | !!! note
Note that if a metadata property was set to visible_for_annotators=False this metadata property will only appear in the metadata filter for users with the admin or owner role.
From the Responses dropdown, type and select the question. You can set a range for rating questions and select specific values for label, multi-label, and span questions.
!!! note
The text and ranking questions are not available for filtering. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | From the Suggestions dropdown, filter the suggestions by Suggestion values, Score , or Agent.
Sort
You can sort your records according to one or several attributes.
The insertion time and last update are general to all records.
The suggestion scores, response, and suggestion values for rating questions and metadata properties are available only when they were provided. | argilla-io/argilla |
argilla/argilla/docs/how_to_guides/annotate.md | Annotate in teams
!!! note
Argilla 2.1 will come with automatic task distribution, which will allow you to distribute the work across several users more efficiently.
Edit guidelines in the settings
As an owner or admin, you can edit the guidelines as much as you need from the icon settings on the header. Markdown format is enabled.
!!! tip
If you want further guidance on good practices for guidelines during the project development, check this blog post. | argilla-io/argilla |
argilla/argilla/docs/tutorials/index.md | description: These are the tutorials for the Argilla SDK. They provide step-by-step instructions for common tasks.
hide: toc
Tutorials
These are the tutorials for the Argilla SDK. They provide step-by-step instructions for common tasks.
__Text classification task__
---
Learn about a standard workflow to improve data quality for a text classification task.
[:octicons-arrow-right-24: How-to guide](text_classification.ipynb) | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | description: This is a step-by-step guide to help you contribute to the Argilla project. We are excited to have you on board! 🚀
hide:
- footer
Thank you for investing your time in contributing to the project! Any contribution you make will be reflected in the most recent version of Argilla 🤩. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | ??? Question "New to contributing in general?"
If you're a new contributor, read the README to get an overview of the project. In addition, here are some resources to help you get started with open-source contributions:
First Contact in Slack | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | First Contact in Slack
Slack is a very useful tool for more casual conversations and to answer day-to-day questions. Click here to join our Slack community effortlessly.
The following screens will be displayed, choose how you wish to join and enter the code sent to you via email.
Once you have joined the community, you'll be added to some channels by default, but below we show you all the community channels you can join:
00-announcements: 📣 Stay up-to-date on official Argilla | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | 01-introductions: 👋 Say hi! to the community Fun facts are appreciated.
02-support-and-questions: 🙋♀️ Need help with Argilla or NLP? We are always here.
03-discoveries-and-news: 📚 Looking for resources and news related to everything NLP?
04-contributors: 🏗️ A channel for contributions and contributors.
05-beta-testing: 🚧 For access to the latest features and help us with testing the newest features.
06-general: 🐒 This channel is for... well, everything else. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | 07-distilabel: ⚗️ For all of you questions about our Distilabel project.
So now there is only one thing left to do, introduce yourself and talk to the community. You'll be always welcome! 🤗👋
Contributor Workflow with Git and GitHub
If you're working with Argilla and suddenly a new idea comes to your mind or you find an issue that can be improved, it's time to actively participate and contribute to the project! | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Report an issue
If you spot a problem, search if an issue already exists. You can use the Label filter. If that is the case, participate in the conversation. If it does not exist, create an issue by clicking on New Issue.
This will show various templates, choose the one that best suits your issue. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Below, you can see an example of the Feature request template. Once you choose one, you will need to fill in it following the guidelines. Try to be as clear as possible. In addition, you can assign yourself to the issue and add or choose the right labels. Finally, click on Submit new issue.
Work with a fork | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Fork the Argilla repository
After having reported the issue, you can start working on it. For that, you will need to create a fork of the project. To do that, click on the Fork button.
Now, fill in the information. Remember to uncheck the Copy develop branch only if you are going to work in or from another branch (for instance, to fix documentation the main branch is used). Then, click on Create fork. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Now, you will be redirected to your fork. You can see that you are in your fork because the name of the repository will be your username/argilla, and it will indicate forked from argilla-io/argilla.
Clone your forked repository
In order to make the required adjustments, clone the forked repository to your local machine. Choose the destination folder and run the following command: | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | sh
git clone https://github.com/[your-github-username]/argilla.git
cd argilla
To keep your fork’s main/develop branch up to date with our repo, add it as an upstream remote branch. For more info, check the documentation.
sh
git remote add upstream https://github.com/argilla-io/argilla.git | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Create a new branch
For each issue you're addressing, it's advisable to create a new branch. GitHub offers a straightforward method to streamline this process.
⚠️ Never work directly on the main or develop branch. Always create a new branch for your changes.
Navigate to your issue and on the right column, select Create a branch. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | After the new window pops up, the branch will be named after the issue, include a prefix such as feature/, bug/, or docs/ to facilitate quick recognition of the issue type. In the Repository destination, pick your fork ( [your-github-username]/argilla), and then select Change branch source to specify the source branch for creating the new one. Complete the process by clicking Create branch. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | 🤔 Remember that the main branch is only used to work with the documentation. For any other changes, use the develop branch.
Now, locally change to the new branch you just created.
sh
git fetch origin
git checkout [branch-name]
Use CHANGELOG.md | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | If you are working on a new feature, it is a good practice to make note of it for others to keep up with the changes. For that, we utilize the CHANGELOG.md file in the root directory. This file is used to list changes made in each version of the project and there are headers that we use to denote each type of change.
- Added: for new features.
- Changed: for changes in existing functionality.
- Deprecated: for soon-to-be removed features.
- Removed: for now removed features. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | - Fixed: for any bug fixes.
- Security: in case of vulnerabilities. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | A sample addition would be:
md
- Fixed the key errors for the `init` method ([#NUMBER_OF_PR](LINK_TO_PR)). Contributed by @github_handle.
You can have a look at the CHANGELOG.md file to see more cases and examples. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Make changes and push them
Make the changes you want in your local repository, and test that everything works and you are following the guidelines. Check the documentation for more information about the development.
Once you have finished, you can check the status of your repository and synchronize with the upstreaming repo with the following command:
```sh
Check the status of your repository
git status
Synchronize with the upstreaming repo | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | git checkout [branch-name]
git rebase [default-branch]
```
If everything is right, we need to commit and push the changes to your fork. For that, run the following commands:
```sh
Add the changes to the staging area
git add filename
Commit the changes by writing a proper message
git commit -m "commit-message"
Push the changes to your fork | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | git push origin [branch-name]
```
When pushing, you will be asked to enter your GitHub login credentials. Once the push is complete, all local commits will be on your GitHub repository. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Create a pull request
Come back to GitHub, navigate to the original repository where you created your fork, and click on Compare & pull request.
First, click on compare across forks and select the right repositories and branches.
In the base repository, keep in mind to select either main or develop based on the modifications made. In the head repository, indicate your forked repository and the branch corresponding to the issue. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Then, fill in the pull request template. In the title, add the feat, bug or docs prefix depending on the type of modification. A general template will be shown, please click on Preview and choose the corresponding pull request template. In addition, on the right side, you can select a reviewer (for instance, if you discussed the issue with a member of the Argilla team) and assign the pull request to yourself. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | It is highly advisable to add labels to PR as well. You can do this again by the labels section right to the screen. For instance, if you are addressing a bug, add the bug label or if the PR is related to the documentation, add the documentation label. This way, PRs can be easily filtered. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Additionally, you should add a prefix to the PR name as we did with the branch above. If you are working on a new feature, you can name your PR as feat: TITLE. If your PR consists of a solution for a bug, you can name your PR as bug: TITLE And, if your work is for improving the documentation, you can name your PR as docs: TITLE. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Finally, click on Create pull request.
Below, we chose the feature template. Now, fill in it carefully and follow the guidelines. Remember to link the original issue. Finally, enable the checkbox to allow maintainer edits so the branch can be updated for a merge and click on Create pull request. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Review your pull request
Once you submit your PR, a team member will review your proposal. We may ask questions, request additional information or ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | You can apply the changes directly through the UI (check the files changed and click on the right-corner three dots, see image below) or from your fork, and then commit them to your branch. The PR will be updated automatically and the suggestions will appear as outdated.
If you run into any merge issues, check out this git tutorial to help you resolve merge conflicts and other issues. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Your PR is merged!
Congratulations 🎉🎊 We thank you 🤩
Once your PR is merged, your contributions will be publicly visible on the Argilla GitHub.
Additionally, we will include your changes in the next release based on our development branch. | argilla-io/argilla |
argilla/argilla/docs/community/contributor.md | Additional resources
Here are some helpful resources for your reference.
Configuring Slack, a guide to learn how to configure Slack.
Pro Git, a book to learn Git.
Git in VSCode, a guide to learn how to easily use Git in VSCode.
GitHub Skills, an interactive course to learn GitHub. | argilla-io/argilla |
argilla/argilla/docs/community/index.md | description: These are the tools and resources to be up-to-date with the Argilla development and contribute to the project.
hide:
- toc
- footer
We are an open-source community-driven project not only focused on building a great product but also on building a great community, where you can get support, share your experiences, and contribute to the project! We would love to hear from you and help you get started with Argilla. | argilla-io/argilla |
argilla/argilla/docs/community/index.md | __Slack__
---
In our Slack you can get direct support from the community.
[:octicons-arrow-right-24: Slack ↗](https://join.slack.com/t/rubrixworkspace/shared_invite/zt-whigkyjn-a3IUJLD7gDbTZ0rKlvcJ5g)
- __Community Meetup__
---
We host bi-weekly community meetups where you can listen in or present your work.
[:octicons-arrow-right-24: Community Meetup ↗](https://lu.ma/argilla-event-calendar)
- __Changelog__
--- | argilla-io/argilla |
argilla/argilla/docs/community/index.md | The changelog is where you can find the latest updates and changes to the Argilla project.
[:octicons-arrow-right-24: Changelog ↗](https://github.com/argilla-io/argilla/blob/develop/argilla/CHANGELOG.md)
- __Roadmap__
---
We love to discuss our plans with the community. Feel encouraged to participate in our roadmap discussions.
[:octicons-arrow-right-24: Roadmap ↗](https://github.com/orgs/argilla-io/projects/10/views/1) | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/search.md | hide: footer
rg.Query
To collect records based on searching criteria, you can use the Query and Filter classes. The Query class is used to define the search criteria, while the Filter class is used to filter the search results. Filter is passed to a Query object so you can combine multiple filters to create complex search queries. A Query object can also be passed to Dataset.records to fetch records based on the search criteria.
Usage Examples | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/search.md | Searching for records with terms
To search for records with terms, you can use the Dataset.records attribute with a query string. The search terms are used to search for records that contain the terms in the text field.
```python
for record in dataset.records(query="paris"):
print(record)
``` | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/search.md | Filtering records by conditions
Argilla allows you to filter records based on conditions. You can use the Filter class to define the conditions and pass them to the Dataset.records attribute to fetch records based on the conditions. Conditions include "==", ">=", "<=", or "in". Conditions can be combined with dot notation to filter records based on metadata, suggestions, or responses.
```python | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/search.md | create a range from 10 to 20
range_filter = rg.Filter(
[
("metadata.count", ">=", 10),
("metadata.count", "<=", 20)
]
)
query records with metadata count greater than 10 and less than 20
query = rg.Query(filters=range_filter, query="paris")
iterate over the results
for record in dataset.records(query=query):
print(record)
```
Class Reference
rg.Query
::: src.argilla.records._search.Query
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/search.md | rg.Filter
::: src.argilla.records._search.Filter
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/SUMMARY.md | rg.Argilla
rg.Workspace
rg.User
rg.Dataset
rg.Dataset.records
rg.Settings
Fields
Questions
Metadata
Vectors
rg.Record
rg.Response
rg.Suggestion
rg.Vector
rg.Metadata
rg.Query | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/workspaces.md | hide: footer
rg.Workspace
In Argilla, workspaces are used to organize datasets in to groups. For example, you might have a workspace for each project or team.
Usage Examples
To create a new workspace, instantiate the Workspace object with the client and the name:
python
workspace = rg.Workspace(name="my_workspace")
workspace.create()
To retrieve an existing workspace, use the client.workspaces attribute:
python
workspace = client.workspaces("my_workspace")
Class Reference | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/workspaces.md | rg.Workspace
::: src.argilla.workspaces._resource.Workspace
options:
heading_level: 4 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/users.md | hide: footer
rg.User
A user in Argilla is a profile that uses the SDK or UI. Their profile can be used to track their feedback activity and to manage their access to the Argilla server.
Usage Examples
To create a new user, instantiate the User object with the client and the username:
python
user = rg.User(username="my_username", password="my_password")
user.create()
Existing users can be retrieved by their username: | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/users.md | python
user = client.users("my_username")
The current user of the rg.Argilla client can be accessed using the me attribute:
python
client.me
Class Reference
rg.User
::: src.argilla.users._resource.User
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/client.md | hide: footer
rg.Argilla
To interact with the Argilla server from Python you can use the Argilla class. The Argilla client is used to create, get, update, and delete all Argilla resources, such as workspaces, users, datasets, and records.
Usage Examples
Connecting to an Argilla server
To connect to an Argilla server, instantiate the Argilla class and pass the api_url of the server and the api_key to authenticate.
```python
import argilla as rg | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/client.md | client = rg.Argilla(
api_url="https://argilla.example.com",
api_key="my_token",
)
```
Accessing Dataset, Workspace, and User objects
The Argilla clients provides access to the Dataset, Workspace, and User objects of the Argilla server.
```python
my_dataset = client.datasets("my_dataset")
my_workspace = client.workspaces("my_workspace") | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/client.md | my_user = client.users("my_user")
```
These resources can then be interacted with to access their properties and methods. For example, to list all datasets in a workspace:
python
for dataset in my_workspace.datasets:
print(dataset.name)
Class Reference
rg.Argilla
::: src.argilla.client.Argilla
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/settings.md | hide: footer
rg.Settings
rg.Settings is used to define the setttings of an Argilla Dataset. The settings can be used to configure the
behavior of the dataset, such as the fields, questions, guidelines, metadata, and vectors. The Settings class is
passed to the Dataset class and used to create the dataset on the server. Once created, the settings of a dataset
cannot be changed.
Usage Examples | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/settings.md | Creating a new dataset with settings
To create a new dataset with settings, instantiate the Settings class and pass it to the Dataset class.
```python
import argilla as rg
settings = rg.Settings(
guidelines="Select the sentiment of the prompt.",
fields=[rg.TextField(name="prompt", use_markdown=True)],
questions=[rg.LabelQuestion(name="sentiment", labels=["positive", "negative"])],
)
dataset = rg.Dataset(name="sentiment_analysis", settings=settings) | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/settings.md | Create the dataset on the server
dataset.create()
```
To define the settings for fields, questions, metadata, or vectors, refer to the rg.TextField, rg.LabelQuestion, rg.TermsMetadataProperty, and rg.VectorField class documentation.
Class Reference
rg.Settings
::: src.argilla.settings._resource.Settings
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/fields.md | hide: footer
Fields
Fields in Argilla are define the content of a record that will be reviewed by a user. | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/fields.md | Usage Examples
To define a field, instantiate the TextField class and pass it to the fields parameter of the Settings class.
python
text_field = rg.TextField(name="text")
markdown_field = rg.TextField(name="text", use_markdown=True)
The fields parameter of the Settings class can accept a list of fields, like this:
```python
settings = rg.Settings(
fields=[
rg.TextField(name="text"),
],
) | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/fields.md | data = rg.Dataset(
name="my_dataset",
settings=settings,
)
```
To add records with values for fields, refer to the rg.Dataset.records documentation.
Class References
rg.TextField
::: src.argilla.settings._field.TextField
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/vectors.md | hide: footer
Vectors
Vector fields in Argilla are used to define the vector form of a record that will be reviewed by a user. | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/vectors.md | Usage Examples
To define a vector field, instantiate the VectorField class with a name and dimenstions, then pass it to the vectors parameter of the Settings class.
python
settings = rg.Settings(
fields=[
rg.TextField(name="text"),
],
vectors=[
rg.VectorField(
name="my_vector",
dimension=768,
title="Document Embedding",
),
],
)
To add records with vectors, refer to the rg.Vector class documentation.
Class Reference | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/vectors.md | rg.VectorField
::: src.argilla.settings._vector.VectorField
options:
heading_level: 3 | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/metadata_property.md | hide: footer
Metadata Properties
Metadata properties are used to define metadata fields in a dataset. Metadata fields are used to store additional information about the records in the dataset. For example, the category of a record, the price of a product, or any other information that is relevant to the record.
Usage Examples | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/metadata_property.md | Defining Metadata Property for a dataset
We define metadata properties via type specific classes. The following example demonstrates how to define metadata properties as either a float, integer, or terms metadata property: | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/metadata_property.md | TermsMetadataProperty is used to define a metadata field with a list of options. For example, a color field with options red, blue, and green. FloatMetadataProperty and IntegerMetadataProperty is used to define a metadata field with a float value. For example, a price field with a minimum value of 0.0 and a maximum value of 100.0.
```python
import argilla as rg | argilla-io/argilla |
argilla/argilla/docs/reference/argilla/settings/metadata_property.md | Define metadata properties as terms
metadata_field = rg.TermsMetadataProperty(
name="color",
options=["red", "blue", "green"],
title="Color",
)
Define metadata properties as float
float_
metadata_field = rg.FloatMetadataProperty(
name="price",
min=0.0,
max=100.0,
title="Price",
) | argilla-io/argilla |