Skip to content

Commit 81b5e0a

Browse files
Merge pull request #1877 from kili-technology/release/2.169.0
chore: release/2.169.0 -> Main
2 parents bf3bc13 + c6e4764 commit 81b5e0a

File tree

118 files changed

+24
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+24
-52
lines changed

docs/sdk/tutorials/llm_dynamic.md

Lines changed: 1 addition & 1 deletion

recipes/frame_dicom_data.ipynb

Lines changed: 7 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
"source": [
4343
"import os\n",
4444
"import shutil\n",
45-
"import subprocess\n",
4645
"\n",
4746
"import requests\n",
4847
"import tqdm"
@@ -165,7 +164,10 @@
165164
"for asset_key in sorted_files.keys():\n",
166165
" print(asset_key)\n",
167166
" im = read_dcm_image(sorted_files[asset_key][20])\n",
168-
" im.save(f\"./recipes/img/frame_dicom_data_{asset_key}.png\")"
167+
" im_directory = os.path.dirname(os.path.abspath(\"\"))\n",
168+
" img_name = f\"frame_dicom_data_{asset_key}.png\"\n",
169+
" save_location = os.path.join(im_directory, \"img\", img_name)\n",
170+
" im.save(img_name)"
169171
]
170172
},
171173
{
@@ -316,56 +318,15 @@
316318
"cell_type": "markdown",
317319
"metadata": {},
318320
"source": [
319-
"Finally, let's import the volumes using `appendManyToDataset` (see [link](https://staging.cloud.kili-technology.com/docs/python-graphql-api/python-api/#append_many_to_dataset)). The key argument is `json_content_array`, which is a list of list of strings. Each element is the list of urls or paths pointing to images of the volume considered.\n",
320-
" - Let's host these images locally to demonstrate how we would do it with cloud URLs for example :"
321-
]
322-
},
323-
{
324-
"cell_type": "code",
325-
"execution_count": null,
326-
"metadata": {},
327-
"outputs": [],
328-
"source": [
329-
"subprocess.Popen(\n",
330-
" f\"python -m http.server 8001 --directory {ASSET_ROOT}\",\n",
331-
" shell=True,\n",
332-
" stdin=None,\n",
333-
" stdout=None,\n",
334-
" stderr=None,\n",
335-
" close_fds=True,\n",
336-
")\n",
337-
"ROOT_URL = \"http://localhost:8001/\""
338-
]
339-
},
340-
{
341-
"cell_type": "code",
342-
"execution_count": null,
343-
"metadata": {},
344-
"outputs": [],
345-
"source": [
346-
"def files_to_urls(files):\n",
347-
" return list(map(lambda file: ROOT_URL + file.split(\"TCGA-LUAD\")[1], files))"
348-
]
349-
},
350-
{
351-
"cell_type": "code",
352-
"execution_count": null,
353-
"metadata": {},
354-
"outputs": [],
355-
"source": [
356-
"kili.append_many_to_dataset(\n",
357-
" project_id=project_id,\n",
358-
" external_id_array=list(sorted_images.keys()),\n",
359-
" json_content_array=list(map(files_to_urls, sorted_images.values())),\n",
360-
")"
321+
"Finally, let's import the volumes using `appendManyToDataset` (see [link](https://staging.cloud.kili-technology.com/docs/python-graphql-api/python-api/#append_many_to_dataset)). The key argument is `json_content_array`, which is a list of list of strings. Each element is the list of urls or paths pointing to images of the volume considered."
361322
]
362323
},
363324
{
364325
"attachments": {},
365326
"cell_type": "markdown",
366327
"metadata": {},
367328
"source": [
368-
"Or, as mentionned, you can simply provide the paths to your images, and call the function like below : "
329+
"You can simply provide the paths to your images, and call the function like below : "
369330
]
370331
},
371332
{
@@ -405,7 +366,7 @@
405366
"source": [
406367
"ds_size = kili.count_assets(project_id=project_id)\n",
407368
"print(ds_size)\n",
408-
"assert ds_size == 6"
369+
"assert ds_size == 3"
409370
]
410371
},
411372
{

recipes/img/AM_10s.gif

-2.5 MB
Binary file not shown.

recipes/img/OD-method-aldod.png

-685 KB
Binary file not shown.

recipes/img/VDX_10s.gif

-4.66 MB
Binary file not shown.
-225 KB
Binary file not shown.

recipes/img/al.png

-42.1 KB
Binary file not shown.

recipes/img/annotation_dicom.png

-319 KB
Binary file not shown.

recipes/img/api_key_step1.png

-570 KB
Binary file not shown.

recipes/img/api_key_step2.png

-448 KB
Binary file not shown.

0 commit comments

Comments
 (0)