Skip to content

Commit

Permalink
[CHORE] Set dev versions for argilla and argilla-server (#5072)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
frascuchon and pre-commit-ci[bot] authored Jun 20, 2024
1 parent 8c122d4 commit d81a2c5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion argilla-server/src/argilla_server/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.

# coding: utf-8
__version__ = "2.0.0-alpha0"
__version__ = "2.0.0-dev"
2 changes: 1 addition & 1 deletion argilla/docs/how_to_guides/record.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ dataset.records.log(records=updated_data)
```

=== "Update vectors"
When a new vector field is added to the dataset settings, or some value for the existing record vectors must updated, you can iterate over the records and update the vectors in the same way as the metadata.
When a new vector field is added to the dataset settings, or some value for the existing record vectors must updated, you can iterate over the records and update the vectors in the same way as the metadata.

```python
updated_records = []
Expand Down
2 changes: 1 addition & 1 deletion argilla/src/argilla/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
from argilla.vectors import * # noqa


__version__ = "2.0.0-alpha0"
__version__ = "2.0.0-dev"
1 change: 1 addition & 0 deletions argilla/src/argilla/_models/_record/_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

FieldValue = Union[str, None]


class RecordModel(ResourceModel):
"""Schema for the records of a `Dataset`"""

Expand Down
1 change: 0 additions & 1 deletion argilla/src/argilla/records/_dataset_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from argilla.settings._metadata import MetadataPropertyBase
from argilla.settings._question import QuestionPropertyBase
from argilla.suggestions import Suggestion
from argilla.vectors import Vector

if TYPE_CHECKING:
from argilla.datasets import Dataset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

@pytest.fixture
def record():

return rg.Record(
id=uuid.uuid4(),
fields={"text": "Hello World, how are you?"},
Expand All @@ -34,7 +33,6 @@ def record():
responses=[rg.Response("label", "positive", user_id=uuid.uuid4())],
metadata={"source": "twitter", "language": "en"},
vectors={"text": [0, 0, 0]},

)


Expand Down
11 changes: 5 additions & 6 deletions argilla/tests/unit/test_resources/test_records.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ def test_record_repr(self):
responses=[Response(question_name="question", value="answer", user_id=user_id)],
)
assert (
record.__repr__() == f"Record(id={record_id},"
"fields={'name': 'John', 'age': '30'},"
"metadata={'key': 'value'},"
"suggestions={'question': {'value': 'answer', 'score': None, 'agent': None}},"
f"responses={{'question': [{{'value': 'answer'}}]}})"
record.__repr__() == f"Record(id={record_id},"
"fields={'name': 'John', 'age': '30'},"
"metadata={'key': 'value'},"
"suggestions={'question': {'value': 'answer', 'score': None, 'agent': None}},"
f"responses={{'question': [{{'value': 'answer'}}]}})"
)

def test_update_record_metadata_by_key(self):
Expand Down Expand Up @@ -62,4 +62,3 @@ def test_update_record_vectors(self):

record.vectors["new-vector"] = [1.0, 2.0, 3.0]
assert record.vectors == {"vector": [1.0, 2.0, 3.0], "new-vector": [1.0, 2.0, 3.0]}

0 comments on commit d81a2c5

Please sign in to comment.