Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG-python/deployment] Impropriate error message when there is empty string in record field values. #5630

Open
Ignoramus0817 opened this issue Oct 25, 2024 · 0 comments

Comments

@Ignoramus0817
Copy link

Describe the bug

When there is empty string (i.e. "") in record field values, uploading records will raise an error httpx.RemoteProtocolError: peer closed connection without sending complete message body (incomplete chunked read), which I think is not helpful for locating the problem. Besides, it would be best if the system automatically processes the empty value for users (e.g. fill a "none").

Stacktrace and Code to create the bug

import argilla as rg

client = rg.Argilla(
    api_url="<api_url>", api_key="<api_key>")

settings = rg.Settings(
    guidelines="These are some guidelines.",
    fields=[
        rg.TextField(
            name="text", title="text", use_markdown=True
        ),
    ],
    questions=[
        rg.LabelQuestion(
            name="label",
            labels=["label_1", "label_2", "label_3"]
        ),
    ],
    metadata=[
        rg.TermsMetadataProperty(
            name="id",
        )
    ]
)

dataset = rg.Dataset(
    name="sample_dataset_0",
    workspace="sft",
    settings=settings,
)

dataset.create()

dataset = client.datasets(name="sample_dataset_0")
records = [
    rg.Record(
        fields={
            "text": "",
        },
        metadata={"id": "0"},
    ),
    rg.Record(
        fields={
            "text": "What is the boiling point of water?",
        },
        metadata={"id": "1"},
    ),
]

dataset.records.log(records)

Expected behavior

Display error message suggesting the empty value or process the empty value automatically.

Environment:

  • OS [e.g. iOS]: Ubuntu 22.04.2 LTS
  • Argilla Version [e.g. 1.0.0]: 2.3.0
  • ElasticSearch Version [e.g. 7.10.2]: 8.12.2
  • Docker Image (optional) [e.g. argilla:v1.0.0]: argilla/argilla-server:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant