Skip to content

Commit 4a6e044

Browse files
author
Matt Sokoloff
committed
minor bugs
1 parent a76f0b6 commit 4a6e044

File tree

12 files changed

+63
-472
lines changed

12 files changed

+63
-472
lines changed

examples/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ Structure:
1515
2. label_export
1616
* [Image annotation export](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/label_export/images.ipynb)
1717
* [Text annotation export](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/label_export/text.ipynb)
18-
* [Video annotation export](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/abel_export/video.ipynb)
18+
* [Video annotation export](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/label_export/video.ipynb)
1919
3. model_assisted_labeling
20-
* [MAL introduction](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/mal_introduction.ipynb)
20+
* [MAL basics](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/mal_basics.ipynb)
2121
* [Image mal example](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/image_mal.ipynb)
2222
* [Named entity recognition mal example](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/ner_mal.ipynb)
23-
* [Debugging mal](https://colab.research.google.com/github/Labelbox/labelbox-python/tree/examples/examples/model_assisted_labeling/debugging_mal.ipynb)
23+
* [Debugging mal](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/debugging_mal.ipynb)
2424
* [MAL with subclasses](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/model_assisted_labeling/mal_with_subclasses.ipynb)
2525
4. project_configuration
2626
* [Project setup](https://colab.research.google.com/github/Labelbox/labelbox-python/blob/examples/examples/project_configuration/project_setup.ipynb)

examples/basics/data_rows.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@
7878
},
7979
{
8080
"cell_type": "code",
81-
"execution_count": 2,
81+
"execution_count": 1,
8282
"id": "rural-fellow",
8383
"metadata": {},
8484
"outputs": [],
8585
"source": [
8686
"# Pick a project that has a dataset attached, data has external ids, and there are some labels\n",
87+
"# This will modify the project so just pick a dummy one that you don't care about\n",
8788
"PROJECT_ID = \"ckk4q1viuc0w20704eh69u28h\"\n",
8889
"# Only update this if you have an on-prem deployment\n",
8990
"ENDPOINT = \"https://api.labelbox.com/graphql\""

examples/basics/datasets.ipynb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@
8383
"source": [
8484
"# Pick a dataset that has attached data_rows\n",
8585
"DATASET_ID = \"ckm4xyfua04cf0z7a3wz58kgj\"\n",
86-
"# Set this if running in colab. Otherwise it should work if you have the LABELBOX_API_KEY set.\n",
87-
"API_KEY = os.environ[\"LABELBOX_API_KEY\"]\n",
8886
"# Only update this if you have an on-prem deployment\n",
8987
"ENDPOINT = \"https://api.labelbox.com/graphql\" "
9088
]

examples/label_export/images.ipynb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 2,
69+
"execution_count": 1,
7070
"id": "intended-traffic",
7171
"metadata": {},
7272
"outputs": [],
@@ -80,7 +80,7 @@
8080
},
8181
{
8282
"cell_type": "code",
83-
"execution_count": 3,
83+
"execution_count": null,
8484
"id": "occupied-slave",
8585
"metadata": {},
8686
"outputs": [],
@@ -168,7 +168,9 @@
168168
],
169169
"source": [
170170
"# First annotation in first data row\n",
171-
"exports[0][\"Label\"][\"objects\"][0]"
171+
"exports[0][\"Label\"][\"objects\"][0]\n",
172+
"# If the number of annotations is 0\n",
173+
"# Or if this example does not have any annotations, then this will throw a KeyError"
172174
]
173175
},
174176
{

examples/model_assisted_labeling/debugging_mal.ipynb

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,10 @@
5959
},
6060
{
6161
"cell_type": "code",
62-
"execution_count": 1,
62+
"execution_count": null,
6363
"id": "dimensional-celebrity",
6464
"metadata": {},
65-
"outputs": [
66-
{
67-
"name": "stdout",
68-
"output_type": "stream",
69-
"text": [
70-
"zsh:1: command not found: pip\n",
71-
"zsh:1: command not found: pip\n",
72-
"zsh:1: command not found: pip\n"
73-
]
74-
}
75-
],
65+
"outputs": [],
7666
"source": [
7767
"!pip install labelbox\n",
7868
"!pip install ndjson\n",

examples/model_assisted_labeling/image_mal.ipynb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"!pip install scikit-image\n",
3030
"!pip install PILLOW\n",
3131
"!pip install tensorflow\n",
32-
"!pip install pip install google-cloud-storage\n",
3332
"!pip install opencv-python"
3433
]
3534
},
@@ -41,10 +40,10 @@
4140
"outputs": [],
4241
"source": [
4342
"# Run these if running in a colab notebook\n",
44-
"!git clone https://github.com/Labelbox/labelbox-python.git\n",
45-
"!mv labelbox-python/examples/model_assisted_labeling/*.py .\n",
46-
"# Requred for ubuntu\n",
47-
"!apt-get update && apt-get -qq install -y libsm6 libxext6"
43+
"COLAB = \"google.colab\" in str(get_ipython())\n",
44+
"if COLAB:\n",
45+
" !git clone https://github.com/Labelbox/labelbox-python.git\n",
46+
" !mv labelbox-python/examples/model_assisted_labeling/*.py ."
4847
]
4948
},
5049
{
@@ -85,7 +84,6 @@
8584
"# If you don't want to give google access to drive you can skip this cell\n",
8685
"# and manually set `API_KEY` below.\n",
8786
"\n",
88-
"COLAB = \"google.colab\" in str(get_ipython())\n",
8987
"if COLAB:\n",
9088
" !pip install colab-env -qU\n",
9189
" from colab_env import envvar_handler\n",

0 commit comments

Comments
 (0)