Skip to content

Commit

Permalink
docs: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
frederik-encord committed Jan 10, 2025
1 parent 66408f6 commit 0b738e0
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/notebooks/twin_project_label_transfer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,19 @@
"runner = Runner(project_hash=\"<project_hash_a>\")\n",
"\n",
"# 2. Get the classification attribute used to query answers\n",
"checklist_classification = (\n",
" runner.project.ontology_structure.classifications[0] # type: ignore\n",
")\n",
"checklist_classification = runner.project.ontology_structure.classifications[\n",
" 0\n",
"] # type: ignore\n",
"checklist_attribute = checklist_classification.attributes[0]\n",
"\n",
"\n",
"# 3. Define the agent\n",
"@runner.stage(stage=\"<transfer_agent_stage_uuid>\")\n",
"def copy_labels(\n",
" manually_annotated_lr: LabelRowV2,\n",
" twin: Annotated[Twin, Depends(dep_twin_label_row(twin_project_hash=\"<project_hash_b>\"))],\n",
" twin: Annotated[\n",
" Twin, Depends(dep_twin_label_row(twin_project_hash=\"<project_hash_b>\"))\n",
" ],\n",
") -> str | None:\n",
" # 4. Reading the checkboxes that have been set\n",
" instance = manually_annotated_lr.get_classification_instances()[0]\n",
Expand Down Expand Up @@ -294,7 +296,7 @@
" if twin.task and isinstance(twin.task, AgentTask):\n",
" twin.task.proceed(pathway_uuid=\"<twin_completion_pathway_uuid>\")\n",
"\n",
" return \"<labeling_completion_pathway_uuid>\"\n"
" return \"<labeling_completion_pathway_uuid>\""
]
},
{
Expand Down

0 comments on commit 0b738e0

Please sign in to comment.