Skip to content

Commit 5f76aa8

Browse files
authored
Merge pull request #147 from Labelbox/ms/ner-notoebook-fix
fix notebook bug
2 parents 2fbe5a8 + 377aeb6 commit 5f76aa8

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

examples/model_assisted_labeling/ner_mal.ipynb

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"cell_type": "code",
29-
"execution_count": 2,
29+
"execution_count": 1,
3030
"id": "delayed-certificate",
3131
"metadata": {},
3232
"outputs": [],
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "code",
50-
"execution_count": 3,
50+
"execution_count": 2,
5151
"id": "monetary-jesus",
5252
"metadata": {},
5353
"outputs": [],
@@ -70,7 +70,7 @@
7070
},
7171
{
7272
"cell_type": "code",
73-
"execution_count": 4,
73+
"execution_count": 3,
7474
"id": "prescribed-colonial",
7575
"metadata": {},
7676
"outputs": [],
@@ -81,7 +81,7 @@
8181
},
8282
{
8383
"cell_type": "code",
84-
"execution_count": 5,
84+
"execution_count": 4,
8585
"id": "incoming-crossing",
8686
"metadata": {},
8787
"outputs": [],
@@ -101,7 +101,7 @@
101101
},
102102
{
103103
"cell_type": "code",
104-
"execution_count": 6,
104+
"execution_count": 5,
105105
"id": "scheduled-attraction",
106106
"metadata": {},
107107
"outputs": [],
@@ -115,7 +115,7 @@
115115
},
116116
{
117117
"cell_type": "code",
118-
"execution_count": 7,
118+
"execution_count": 6,
119119
"id": "corrected-activation",
120120
"metadata": {},
121121
"outputs": [],
@@ -135,7 +135,7 @@
135135
},
136136
{
137137
"cell_type": "code",
138-
"execution_count": 8,
138+
"execution_count": 7,
139139
"id": "improving-carter",
140140
"metadata": {},
141141
"outputs": [
@@ -145,7 +145,7 @@
145145
"True"
146146
]
147147
},
148-
"execution_count": 9,
148+
"execution_count": 7,
149149
"metadata": {},
150150
"output_type": "execute_result"
151151
}
@@ -156,7 +156,7 @@
156156
},
157157
{
158158
"cell_type": "code",
159-
"execution_count": 9,
159+
"execution_count": 8,
160160
"id": "dried-mediterranean",
161161
"metadata": {},
162162
"outputs": [],
@@ -177,20 +177,20 @@
177177
},
178178
{
179179
"cell_type": "code",
180-
"execution_count": 10,
180+
"execution_count": 9,
181181
"id": "complex-vietnamese",
182182
"metadata": {},
183183
"outputs": [
184184
{
185185
"name": "stdout",
186186
"output_type": "stream",
187187
"text": [
188-
"2021-03-29 16:46:54,860 --------------------------------------------------------------------------------\n",
189-
"2021-03-29 16:46:54,861 The model key 'ner-ontonotes-fast' now maps to 'https://huggingface.co/flair/ner-english-ontonotes-fast' on the HuggingFace ModelHub\n",
190-
"2021-03-29 16:46:54,862 - The most current version of the model is automatically downloaded from there.\n",
191-
"2021-03-29 16:46:54,863 - (you can alternatively manually download the original model at https://nlp.informatik.hu-berlin.de/resources/models/ner-ontonotes-fast/en-ner-ontonotes-fast-v0.4.pt)\n",
192-
"2021-03-29 16:46:54,863 --------------------------------------------------------------------------------\n",
193-
"2021-03-29 16:46:55,205 loading file /Users/matthewsokoloff/.flair/models/ner-english-ontonotes-fast/0d55dd3b912da9cf26e003035a0c269a0e9ab222f0be1e48a3bbba3a58c0fed0.c9907cd5fde3ce84b71a4172e7ca03841cd81ab71d13eb68aa08b259f57c00b6\n"
188+
"2021-04-28 13:39:33,259 --------------------------------------------------------------------------------\n",
189+
"2021-04-28 13:39:33,260 The model key 'ner-ontonotes-fast' now maps to 'https://huggingface.co/flair/ner-english-ontonotes-fast' on the HuggingFace ModelHub\n",
190+
"2021-04-28 13:39:33,260 - The most current version of the model is automatically downloaded from there.\n",
191+
"2021-04-28 13:39:33,261 - (you can alternatively manually download the original model at https://nlp.informatik.hu-berlin.de/resources/models/ner-ontonotes-fast/en-ner-ontonotes-fast-v0.4.pt)\n",
192+
"2021-04-28 13:39:33,262 --------------------------------------------------------------------------------\n",
193+
"2021-04-28 13:39:33,785 loading file /Users/matthewsokoloff/.flair/models/ner-english-ontonotes-fast/0d55dd3b912da9cf26e003035a0c269a0e9ab222f0be1e48a3bbba3a58c0fed0.c9907cd5fde3ce84b71a4172e7ca03841cd81ab71d13eb68aa08b259f57c00b6\n"
194194
]
195195
}
196196
],
@@ -212,19 +212,19 @@
212212
},
213213
{
214214
"cell_type": "code",
215-
"execution_count": 11,
215+
"execution_count": 10,
216216
"id": "usual-fellow",
217217
"metadata": {},
218218
"outputs": [],
219219
"source": [
220-
"def get_ner_ndjson(datarow_id: str, schema_id: str, start: int,\n",
220+
"def get_ner_ndjson(datarow_id: str, feature_schema_id: str, start: int,\n",
221221
" end: int) -> Dict[str, Any]:\n",
222222
" \"\"\"\n",
223223
" * https://docs.labelbox.com/data-model/en/index-en#entity\n",
224224
" \n",
225225
" Args:\n",
226226
" datarow_id (str): id of the data_row (in this case image) to add this annotation to\n",
227-
" schema_id (str): id of the bbox tool in the current ontology\n",
227+
" feature_schema_id (str): id of the bbox tool in the current ontology\n",
228228
" start (int): Character index where the entity begins\n",
229229
" end (int): Character index where the entity ends\n",
230230
" Returns:\n",
@@ -245,7 +245,7 @@
245245
},
246246
{
247247
"cell_type": "code",
248-
"execution_count": 12,
248+
"execution_count": 11,
249249
"id": "mineral-worse",
250250
"metadata": {},
251251
"outputs": [],
@@ -272,7 +272,7 @@
272272
},
273273
{
274274
"cell_type": "code",
275-
"execution_count": 13,
275+
"execution_count": 12,
276276
"id": "caroline-medication",
277277
"metadata": {},
278278
"outputs": [],
@@ -284,17 +284,17 @@
284284
},
285285
{
286286
"cell_type": "code",
287-
"execution_count": 14,
287+
"execution_count": 13,
288288
"id": "extensive-momentum",
289289
"metadata": {},
290290
"outputs": [
291291
{
292292
"name": "stdout",
293293
"output_type": "stream",
294294
"text": [
295-
"{'uuid': '55857428-16d4-45f6-930f-2c673d4b54e4', 'dataRow': {'id': 'ckmv2avfg081f0y8u63y16u77'}, 'status': 'SUCCESS'}\n",
296-
"{'uuid': '88320670-2e63-4e71-bee3-ab64085e3f2b', 'dataRow': {'id': 'ckmv2avfg081f0y8u63y16u77'}, 'status': 'SUCCESS'}\n",
297-
"{'uuid': '0aa39034-bb8a-4dfe-bbe9-657fd9dad71d', 'dataRow': {'id': 'ckmv2avfg081f0y8u63y16u77'}, 'status': 'SUCCESS'}\n"
295+
"{'uuid': 'f7463328-48f0-4b9f-a71c-fe0531284814', 'dataRow': {'id': 'cko1qthsd6usd0ydu5ier4r7g'}, 'status': 'SUCCESS'}\n",
296+
"{'uuid': 'd1966b22-4b23-4085-90a2-03b99c9bef9e', 'dataRow': {'id': 'cko1qthsd6usd0ydu5ier4r7g'}, 'status': 'SUCCESS'}\n",
297+
"{'uuid': '7503ce1e-cd0e-4fe4-8e45-39a79c68562a', 'dataRow': {'id': 'cko1qthsd6usd0ydu5ier4r7g'}, 'status': 'SUCCESS'}\n"
298298
]
299299
}
300300
],

0 commit comments

Comments
 (0)