-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 230 feature add sentence transformers support for the to argill…
…a method (#262) * chore: initial outline adding vectors * chore: added sentence-transformers to extras * chore: aded `add_vectors_to_argilla_dataset` method to generation tasks * chore: updated to_argilla methods with call to `Task.add_vectors_to_argilla_dataset` * chore: updated warning * chore: resolved linting issues * Update pyproject.toml * chore: move logic to `CustomDataset` class * tests: added basic tests for `to_argilla` method * docs: updated references to `vector_strategy` * chore: reformatted tests * chore: remove cache step * chore: limit to using 5 fields and defaulting to the first 5 * tests: resolved failing tests * tests: remove faulty type hint * chore: configered argilla version * chore: processed comments code reveiw * chore: updated field selected based on column names * chore: added a extra check for dataset_columns is False or []
- Loading branch information
1 parent
0513bba
commit 698b556
Showing
11 changed files
with
175 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
import argilla as rg | ||
from argilla.client.feedback.integrations.sentencetransformers import ( | ||
SentenceTransformersExtractor, | ||
) | ||
|
||
rg.init(api_key="<YOUR_ARGILLA_API_KEY>", api_url="<YOUR_ARGILLA_API_URL>") | ||
|
||
rg_dataset = pipe_dataset.to_argilla() | ||
rg_dataset.push_to_argilla(name="preference-dataset", workspace="admin") | ||
|
||
# with a custom `vector_strategy`` | ||
vector_strategy = SentenceTransformersExtractor(model="TaylorAI/bge-micro-v2") | ||
rg_dataset = pipe_dataset.to_argilla(vector_strategy=vector_strategy) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters