Skip to content

Commit

Permalink
docs: ruff fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
frederik-encord committed Jan 10, 2025
1 parent 0648151 commit a4f1c7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions docs/notebooks/prelabel_videos_with_bounding_boxes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
" \"\"\"\n",
" Simple function that takes in an nd array of pixel values ([h, w, c], RGB)\n",
" And return a list of random bounding boxes. Random in location and with\n",
" three different \n",
" three different\n",
" \"\"\"\n",
" return [\n",
" ModelPrediction(\n",
Expand Down Expand Up @@ -286,11 +286,7 @@
" # e. Store the results\n",
" for output in outputs:\n",
" ins = ontology.objects[output.label].create_instance()\n",
" ins.set_for_frames(\n",
" frames=frame.frame, \n",
" coordinates=output.coords, \n",
" confidence=output.conf\n",
" )\n",
" ins.set_for_frames(frames=frame.frame, coordinates=output.coords, confidence=output.conf)\n",
"\n",
" lr.add_object_instance(ins)\n",
"\n",
Expand Down
8 changes: 2 additions & 6 deletions docs/notebooks/twin_project_label_transfer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -256,19 +256,15 @@
"runner = Runner(project_hash=\"<project_hash_a>\")\n",
"\n",
"# 2. Get the classification attribute used to query answers\n",
"checklist_classification = runner.project.ontology_structure.classifications[\n",
" 0\n",
"] # type: ignore\n",
"checklist_classification = runner.project.ontology_structure.classifications[0] # 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[\n",
" Twin, Depends(dep_twin_label_row(twin_project_hash=\"<project_hash_b>\"))\n",
" ],\n",
" twin: Annotated[Twin, Depends(dep_twin_label_row(twin_project_hash=\"<project_hash_b>\"))],\n",
") -> str | None:\n",
" # 4. Reading the checkboxes that have been set\n",
" instance = manually_annotated_lr.get_classification_instances()[0]\n",
Expand Down

0 comments on commit a4f1c7c

Please sign in to comment.