Skip to content

Commit c45054e

Browse files
author
Matt Sokoloff
committed
export examples
1 parent f1c3d9a commit c45054e

File tree

10 files changed

+3711
-41
lines changed

10 files changed

+3711
-41
lines changed

examples/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Labelbox SDK Examples
2+
3+
##### This section contains examples for using the sdk.
4+
Ideally we will have examples for all use cases.
5+
If you need an example to help you with a particular use case please reach out (msokoloff@labelbox.com)
6+
7+
8+
Structure:
9+
10+
1. basics
11+
* These are all of the required concepts to use the sdk. Other sections build off of this one so make sure you are familiar.
12+
2. data_export
13+
* Contains information on how to export and use labels from labelbox
14+
3. model_assisted_labeling
15+
* Provides examples on using and debugging mal.
16+
4. project_configuration
17+
* Scripts on setting up project. This explains more sophisticatd configurations including customizing the queue.

examples/basics/README.MD

Lines changed: 0 additions & 14 deletions
This file was deleted.

examples/basics/basics.ipynb

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,27 +146,36 @@
146146
},
147147
{
148148
"cell_type": "code",
149-
"execution_count": 14,
150-
"id": "adapted-parish",
149+
"execution_count": null,
150+
"id": "rational-marshall",
151151
"metadata": {},
152-
"outputs": [
153-
{
154-
"data": {
155-
"text/plain": [
156-
"<Project ID: ckk4q1viuc0w20704eh69u28h>"
157-
]
158-
},
159-
"execution_count": 14,
160-
"metadata": {},
161-
"output_type": "execute_result"
162-
}
163-
],
152+
"outputs": [],
164153
"source": [
165154
"#The above two queries return PaginatedCollections because the filter parameters aren't guarenteed to be unique.\n",
166155
"#This object is an iterable containing the query results\n",
167156
"next(projects)"
168157
]
169158
},
159+
{
160+
"cell_type": "code",
161+
"execution_count": null,
162+
"id": "handmade-yugoslavia",
163+
"metadata": {},
164+
"outputs": [],
165+
"source": [
166+
"# Filtering is only supported using the object you are querying for\n",
167+
"#eg. is not valid since get_project returns a Project but we are filtering on a Dataset\n",
168+
"projects = client.get_projects(where = Dataset.name == \"dataset_name\") #INVALID\n",
169+
"\n",
170+
"## Instead we should use relationships.\n",
171+
"#If we want all projects where there is a particular attached dataset we can do\n",
172+
"list(dataset.project())\n",
173+
"#Filtering Takeaways\n",
174+
"#1. Filtering only works on a single object type at a time\n",
175+
"#2. The where clause requires that we pass an object that is of the same type that is being retured by the query\n",
176+
"#3. If we want to filter based on a relationship, we should use the relationship attribute of objects"
177+
]
178+
},
170179
{
171180
"cell_type": "code",
172181
"execution_count": 15,

examples/basics/projects.ipynb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,7 @@
1818
" - Those datasets have datarows which is what is being labeled\n",
1919
"* Each project has an ontology which defines the types of annotations supported during this labeling pass\n",
2020
"\n",
21-
"** Note that there is a lot of advanced usage that is not covered in this notebook. See workflows for those functions.\n",
22-
"1. export_labels() #Is in here but much more details can be found in the workflows\n",
23-
"2. labeler_performance()\n",
24-
"3. review_metrics\n",
25-
"4. upload_annotations\n",
26-
"5. Setup *** \n",
27-
"6. set_labeling_parameter_overrides\n",
28-
"7. unset_labeling_parameter_overrides\n",
29-
"8. upsert_review_queue\n",
30-
"9. enable_model_assisted_labeling\n",
31-
"\n",
32-
"##TODO: Go through and add references to workflow notebooks for these functions\n",
33-
"\n",
21+
"** Note that there is a lot of advanced usage that is not covered in this notebook. See project_setup for those functions.\n",
3422
"* Also note that deprecated functions are not explained here."
3523
]
3624
},

0 commit comments

Comments
 (0)