Skip to content

Commit

Permalink
fix: fix errors in code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
burtenshaw committed Jun 20, 2024
1 parent f5794e3 commit 7aebd54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions argilla/docs/how_to_guides/migrate_from_legacy_datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Here are a set of example functions to convert the records for single-label and
if prediction := data.get("prediction"):
scores = [span["score"] for span in prediction]
agent = data["prediction_agent"]
suggestions.append(rg.Suggestion(question_name="labels", value=prediction, score=scores, agent=agent))
suggestions.append(rg.Suggestion(question_name="spans", value=prediction, score=scores, agent=agent))

if annotation := data.get("annotation"):
user_id = users_by_name.get(data["annotation_agent"], current_user).id
Expand Down Expand Up @@ -271,7 +271,7 @@ new_client = rg.Argilla(new_server_api_url, new_server_api_key)

dataset_name = "feedback-dataset"
old_dataset = old_client.datasets(name=dataset_name)
new_dataset = new_client.datasets.add(dataset)
new_dataset = new_client.datasets.add(old_dataset)

# Load the records from the old server
new_dataset.records.log(
Expand Down

0 comments on commit 7aebd54

Please sign in to comment.