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] #5657

Open
lundberg-johan12 opened this issue Oct 30, 2024 · 0 comments
Open

[BUG-python/deployment] #5657

lundberg-johan12 opened this issue Oct 30, 2024 · 0 comments
Assignees

Comments

@lundberg-johan12
Copy link

Describe the bug
Adding responses to records does not show up in the UI but does appear if checking the response field of each record.

Stacktrace and Code to create the bug
settings = rg.Settings(
fields=[
rg.TextField(name="customer_question", title="Customer Question", description="The question from the customer"),
],
questions=[
rg.TextQuestion(name="answer_filled", title="Fill in the good answer"),
]
)
test_dataset = rg.Dataset(
name="test_dataset",
workspace=workspace_name,
client=client,
settings=settings
)
test_dataset.create()

owner = client.users("user")
records = [rg.Record(id=id, fields={"customer_question": question}, responses=[rg.Response(question_name="answer_filled", value=answer, user_id=owner.id, _record=id)]) for id, question, answer in zip(ids, questions, answers)]
test_dataset.records.log(records=records)
test_dataset.update()

for record in test_dataset.records:
print(record.fields["customer_question"])
for response in record.responses:
print(response.question_name, response.value)

Expected behavior
the response field in the UI should have the same value as the record in test_dataset.records.

Environment:
python 3.12.2
argilla 2.3.0

Additional context
Code run in a notebook

@frascuchon frascuchon self-assigned this Nov 12, 2024
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

2 participants