Skip to content

Commit 4976077

Browse files
authored
chore(docs): remove inaccurate 2MB-per-worker memory claim from download docstrings (#2662)
1 parent ff94911 commit 4976077

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

cognite/client/_api/data_modeling/files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ async def download(
9191
) -> None:
9292
"""`Download files by instance ID. <https://api-docs.cognite.com/20230101/tag/Files/operation/downloadLinks>`_
9393
94-
Streams all files to disk, never keeping more than 2MB in memory per worker.
94+
Streams all files to disk one chunk at a time. By default, chunk size is dynamic to maximize
95+
throughput; set ``global_config.file_download_chunk_size`` (bytes) to enforce a fixed size.
9596
9697
Args:
9798
directory (Path): Directory to download the file(s) to.

cognite/client/_api/files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,8 @@ async def download(
12201220
) -> None:
12211221
"""`Download files by id or external id <https://api-docs.cognite.com/20230101/tag/Files/operation/downloadLinks>`_.
12221222
1223-
This method will stream all files to disk, never keeping more than 2MB in memory per worker.
1223+
This method streams all files to disk one chunk at a time. By default, chunk size is dynamic to maximize
1224+
throughput; set ``global_config.file_download_chunk_size`` (bytes) to enforce a fixed size.
12241225
The files will be stored in the provided directory using the file name retrieved from the file metadata in CDF.
12251226
You can also choose to keep the directory structure from CDF so that the files will be stored in subdirectories
12261227
matching the directory attribute on the files. When missing, the (root) directory is used.

cognite/client/_sync_api/data_modeling/files.py

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cognite/client/_sync_api/files.py

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)