argilla-io / argilla

Argilla is a collaboration tool for AI engineers and domain experts to build high-quality datasets
https://docs.argilla.io
Apache License 2.0
4k stars 378 forks source link

[BUG-python/deployment] Error validating the data on record update with dataset.records.log() #5623

Open castares opened 1 month ago

castares commented 1 month ago

Describe the bug

When I try to update a record with a suggestion, I receive an error. I have reproduced this error running the Text Classification tutorial notebook. The dataset.records.log(records=updated_data) from the section "Add initial model suggestions", fails. My server is deployed locally with the docker-compose.yml from the documentation.

Stacktrace and Code to create the bug

On client side, with the server deployed using docker:

argilla._exceptions._api.InternalServerError: Argilla SDK error: InternalServerError: Internal server error. Details: {"detail":{"code":"argilla.api.errors::GenericServerError","params":{"type":"builtins.AttributeError","message":"'NoneType' object has no attribute 'items'"}}}

Server side error:

"/opt/venv/lib/python3.10/site-
packages/argilla_server/api/sch
emas/v1/records.py", line 103,
in validate_chat_fields
for key, value in
fields.items():
AttributeError: 'NoneType'
object has no attribute 'items'

Expected behavior

Environment:

Additional context