|
24 | 24 | },
|
25 | 25 | {
|
26 | 26 | "cell_type": "code",
|
27 |
| - "execution_count": 1, |
| 27 | + "execution_count": null, |
28 | 28 | "id": "posted-nation",
|
29 | 29 | "metadata": {},
|
30 | 30 | "outputs": [],
|
|
34 | 34 | },
|
35 | 35 | {
|
36 | 36 | "cell_type": "code",
|
37 |
| - "execution_count": 2, |
| 37 | + "execution_count": 1, |
38 | 38 | "id": "beautiful-ready",
|
39 | 39 | "metadata": {},
|
40 | 40 | "outputs": [],
|
|
47 | 47 | },
|
48 | 48 | {
|
49 | 49 | "cell_type": "code",
|
50 |
| - "execution_count": 3, |
| 50 | + "execution_count": 2, |
51 | 51 | "id": "vertical-stockholm",
|
52 | 52 | "metadata": {},
|
53 | 53 | "outputs": [],
|
|
78 | 78 | },
|
79 | 79 | {
|
80 | 80 | "cell_type": "code",
|
81 |
| - "execution_count": 4, |
| 81 | + "execution_count": 3, |
82 | 82 | "id": "rural-fellow",
|
83 | 83 | "metadata": {},
|
84 | 84 | "outputs": [],
|
85 | 85 | "source": [
|
86 | 86 | "# Pick a project that has a dataset attached, data has external ids, and there are some labels\n",
|
87 | 87 | "# This will modify the project so just pick a dummy one that you don't care about\n",
|
88 |
| - "PROJECT_ID = \"ckk4q1viuc0w20704eh69u28h\"\n", |
| 88 | + "PROJECT_ID = \"ckpnfquwy0kyg0y8t9rwb99cz\"\n", |
89 | 89 | "# Only update this if you have an on-prem deployment\n",
|
90 | 90 | "ENDPOINT = \"https://api.labelbox.com/graphql\""
|
91 | 91 | ]
|
92 | 92 | },
|
93 | 93 | {
|
94 | 94 | "cell_type": "code",
|
95 |
| - "execution_count": 5, |
| 95 | + "execution_count": 4, |
96 | 96 | "id": "proof-detective",
|
97 | 97 | "metadata": {},
|
98 | 98 | "outputs": [],
|
|
102 | 102 | },
|
103 | 103 | {
|
104 | 104 | "cell_type": "code",
|
105 |
| - "execution_count": 6, |
| 105 | + "execution_count": 5, |
106 | 106 | "id": "selective-reconstruction",
|
107 | 107 | "metadata": {},
|
108 | 108 | "outputs": [],
|
|
123 | 123 | },
|
124 | 124 | {
|
125 | 125 | "cell_type": "code",
|
126 |
| - "execution_count": 7, |
| 126 | + "execution_count": 6, |
127 | 127 | "id": "extra-paris",
|
128 | 128 | "metadata": {},
|
129 | 129 | "outputs": [],
|
|
134 | 134 | },
|
135 | 135 | {
|
136 | 136 | "cell_type": "code",
|
137 |
| - "execution_count": 8, |
| 137 | + "execution_count": 7, |
138 | 138 | "id": "packed-going",
|
139 | 139 | "metadata": {},
|
140 | 140 | "outputs": [
|
141 | 141 | {
|
142 | 142 | "name": "stdout",
|
143 | 143 | "output_type": "stream",
|
144 | 144 | "text": [
|
145 |
| - "Associated dataset <Dataset {'created_at': datetime.datetime(2021, 3, 28, 23, 35, 34, tzinfo=datetime.timezone.utc), 'description': '', 'name': 'image_mal_dataset', 'uid': 'ckmtsvzps21f80y6205t304se', 'updated_at': datetime.datetime(2021, 3, 28, 23, 35, 34, tzinfo=datetime.timezone.utc)}>\n", |
146 |
| - "Associated label(s) <Label {'agreement': None, 'benchmark_agreement': None, 'created_at': datetime.datetime(2021, 3, 29, 17, 53, 36, tzinfo=datetime.timezone.utc), 'is_benchmark_reference': False, 'label': '{\"objects\":[{\"featureId\":\"ckmuw40nm00013g68kfua4i88\",\"schemaId\":\"ckk4q1vo80nhv0y92b7vgctgt\",\"title\":\"Frog\",\"value\":\"frog\",\"color\":\"#00D4FF\",\"bbox\":{\"top\":815,\"left\":847,\"height\":247,\"width\":512},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmuw40nm00013g68kfua4i88\"}],\"classifications\":[]}', 'seconds_to_label': 0, 'uid': 'ckmuw42qy00033g68zdhpove7', 'updated_at': datetime.datetime(2021, 3, 29, 17, 54, 32, tzinfo=datetime.timezone.utc)}>\n", |
147 |
| - "External id dbb168f6-4f2c-46e0-a22a-abc837fda3f1\n" |
| 145 | + "Associated dataset <Dataset {'created_at': datetime.datetime(2021, 6, 8, 2, 40, 10, tzinfo=datetime.timezone.utc), 'description': '', 'name': 'image_mea_dataset', 'uid': 'ckpnfqv6g1rvb0ybt85hjephs', 'updated_at': datetime.datetime(2021, 6, 8, 2, 40, 10, tzinfo=datetime.timezone.utc)}>\n", |
| 146 | + "Associated label(s) <Label {'agreement': None, 'benchmark_agreement': None, 'created_at': datetime.datetime(2021, 6, 8, 2, 42, 11, tzinfo=datetime.timezone.utc), 'is_benchmark_reference': False, 'label': '{\"objects\":[{\"featureId\":\"ckpnftdgo00013h693jxji4wa\",\"schemaId\":\"ckpnfqw600kyt0y8tgwsb01xg\",\"title\":\"person\",\"value\":\"person\",\"color\":\"#ff0000\",\"bbox\":{\"top\":1044,\"left\":1460,\"height\":265,\"width\":118},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckpnftdgo00013h693jxji4wa\"},{\"featureId\":\"ckpo2bsq800013h69mi1w6xz1\",\"schemaId\":\"ckpnfqw610kyx0y8t4hotc6ld\",\"title\":\"car\",\"value\":\"car\",\"color\":\"#00ffff\",\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckpo2bsq800013h69mi1w6xz1\"}],\"classifications\":[]}', 'seconds_to_label': 101.633, 'uid': 'ckpnftgpx00033h69z83erv92', 'updated_at': datetime.datetime(2021, 6, 9, 0, 51, 34, tzinfo=datetime.timezone.utc)}>\n", |
| 147 | + "External id 3b983504-bfbd-4c26-8719-8ef2d5a2c14f\n" |
148 | 148 | ]
|
149 | 149 | }
|
150 | 150 | ],
|
|
157 | 157 | },
|
158 | 158 | {
|
159 | 159 | "cell_type": "code",
|
160 |
| - "execution_count": 9, |
| 160 | + "execution_count": 8, |
161 | 161 | "id": "above-vocabulary",
|
162 | 162 | "metadata": {},
|
163 | 163 | "outputs": [
|
164 | 164 | {
|
165 | 165 | "name": "stdout",
|
166 | 166 | "output_type": "stream",
|
167 | 167 | "text": [
|
168 |
| - "<DataRow {'created_at': datetime.datetime(2021, 3, 28, 23, 35, 35, tzinfo=datetime.timezone.utc), 'external_id': 'dbb168f6-4f2c-46e0-a22a-abc837fda3f1', 'row_data': 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Kitano_Street_Kobe01s5s4110.jpg/2560px-Kitano_Street_Kobe01s5s4110.jpg', 'uid': 'ckmtsvzx421fb0y62bbsmbavz', 'updated_at': datetime.datetime(2021, 3, 29, 17, 54, 56, tzinfo=datetime.timezone.utc)}>\n" |
| 168 | + "<DataRow {'created_at': datetime.datetime(2021, 6, 8, 2, 40, 10, tzinfo=datetime.timezone.utc), 'external_id': '3b983504-bfbd-4c26-8719-8ef2d5a2c14f', 'media_attributes': {'width': 2560, 'height': 1707, 'mimeType': 'image/jpeg'}, 'row_data': 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/08/Kitano_Street_Kobe01s5s4110.jpg/2560px-Kitano_Street_Kobe01s5s4110.jpg', 'uid': 'ckpnfqvcb0t2o0yane73d3whi', 'updated_at': datetime.datetime(2021, 6, 9, 0, 51, tzinfo=datetime.timezone.utc)}>\n" |
169 | 169 | ]
|
170 | 170 | }
|
171 | 171 | ],
|
|
185 | 185 | },
|
186 | 186 | {
|
187 | 187 | "cell_type": "code",
|
188 |
| - "execution_count": 10, |
| 188 | + "execution_count": 9, |
189 | 189 | "id": "medical-portuguese",
|
190 | 190 | "metadata": {},
|
191 | 191 | "outputs": [
|
192 | 192 | {
|
193 | 193 | "data": {
|
194 | 194 | "text/plain": [
|
195 |
| - "<DataRow ID: ckmuw60q700ur0y8wcu178hbi>" |
| 195 | + "<DataRow ID: ckporcoee1c7s0z7fha6l5x0d>" |
196 | 196 | ]
|
197 | 197 | },
|
198 |
| - "execution_count": 14, |
| 198 | + "execution_count": 9, |
199 | 199 | "metadata": {},
|
200 | 200 | "output_type": "execute_result"
|
201 | 201 | }
|
|
213 | 213 | },
|
214 | 214 | {
|
215 | 215 | "cell_type": "code",
|
216 |
| - "execution_count": 11, |
| 216 | + "execution_count": 10, |
217 | 217 | "id": "round-perfume",
|
218 | 218 | "metadata": {},
|
219 | 219 | "outputs": [],
|
|
228 | 228 | },
|
229 | 229 | {
|
230 | 230 | "cell_type": "code",
|
231 |
| - "execution_count": 12, |
| 231 | + "execution_count": 11, |
232 | 232 | "id": "breeding-brother",
|
233 | 233 | "metadata": {},
|
234 | 234 | "outputs": [],
|
|
243 | 243 | },
|
244 | 244 | {
|
245 | 245 | "cell_type": "code",
|
246 |
| - "execution_count": 13, |
| 246 | + "execution_count": 12, |
247 | 247 | "id": "thrown-designation",
|
248 | 248 | "metadata": {},
|
249 | 249 | "outputs": [],
|
|
256 | 256 | },
|
257 | 257 | {
|
258 | 258 | "cell_type": "code",
|
259 |
| - "execution_count": 14, |
| 259 | + "execution_count": 13, |
260 | 260 | "id": "japanese-jefferson",
|
261 | 261 | "metadata": {},
|
262 | 262 | "outputs": [],
|
|
272 | 272 | },
|
273 | 273 | {
|
274 | 274 | "cell_type": "code",
|
275 |
| - "execution_count": 15, |
| 275 | + "execution_count": 14, |
276 | 276 | "id": "accessible-effort",
|
277 | 277 | "metadata": {},
|
278 | 278 | "outputs": [
|
|
304 | 304 | },
|
305 | 305 | {
|
306 | 306 | "cell_type": "code",
|
307 |
| - "execution_count": 16, |
| 307 | + "execution_count": 15, |
308 | 308 | "id": "floral-elimination",
|
309 | 309 | "metadata": {},
|
310 | 310 | "outputs": [
|
311 | 311 | {
|
312 | 312 | "name": "stdout",
|
313 | 313 | "output_type": "stream",
|
314 | 314 | "text": [
|
315 |
| - "18201a8d-34a5-41ea-8ea0-feede9776b4a 18201a8d-34a5-41ea-8ea0-feede9776b4a\n" |
| 315 | + "337e90de-c13c-48be-a87d-94d331b5e9a7 337e90de-c13c-48be-a87d-94d331b5e9a7\n" |
316 | 316 | ]
|
317 | 317 | }
|
318 | 318 | ],
|
|
325 | 325 | },
|
326 | 326 | {
|
327 | 327 | "cell_type": "code",
|
328 |
| - "execution_count": 17, |
| 328 | + "execution_count": 16, |
329 | 329 | "id": "collect-cosmetic",
|
330 | 330 | "metadata": {},
|
331 | 331 | "outputs": [
|
332 | 332 | {
|
333 | 333 | "data": {
|
334 | 334 | "text/plain": [
|
335 |
| - "<AssetMetadata ID: ckmuw6mme5mpr0y839dzheh7c>" |
| 335 | + "<AssetAttachment ID: ckporcvj61dni0y632e6cb217>" |
336 | 336 | ]
|
337 | 337 | },
|
338 |
| - "execution_count": 21, |
| 338 | + "execution_count": 16, |
339 | 339 | "metadata": {},
|
340 | 340 | "output_type": "execute_result"
|
341 | 341 | }
|
342 | 342 | ],
|
343 | 343 | "source": [
|
344 | 344 | "# We can also create attachments\n",
|
345 | 345 | "# Attachments are visible for all projects connected to the data_row \n",
|
346 |
| - "data_row.create_metadata(meta_type=\"TEXT\", meta_value=\"LABELERS WILL SEE THIS \")\n", |
| 346 | + "data_row.create_attachment(attachment_type=\"TEXT\", attachment_value=\"LABELERS WILL SEE THIS \")\n", |
347 | 347 | "# See more information here:\n",
|
348 | 348 | "# https://docs.labelbox.com/data-model/en/index-en#attachments\n",
|
349 |
| - "# Note that meta_value must always be a string (url to a video/image or a text value to display)" |
| 349 | + "# Note that attachment_value must always be a string (url to a video/image or a text value to display)" |
350 | 350 | ]
|
351 | 351 | },
|
352 | 352 | {
|
|
359 | 359 | },
|
360 | 360 | {
|
361 | 361 | "cell_type": "code",
|
362 |
| - "execution_count": 18, |
| 362 | + "execution_count": 17, |
363 | 363 | "id": "dental-banana",
|
364 | 364 | "metadata": {},
|
365 | 365 | "outputs": [],
|
|
370 | 370 | },
|
371 | 371 | {
|
372 | 372 | "cell_type": "code",
|
373 |
| - "execution_count": 19, |
| 373 | + "execution_count": 18, |
374 | 374 | "id": "binary-organic",
|
375 | 375 | "metadata": {},
|
376 | 376 | "outputs": [],
|
|
0 commit comments