-
Notifications
You must be signed in to change notification settings - Fork 381
make fsspec.asyn._get_batch_size()
public
#1327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I suspect that there was simply no use case for this before to make it public. Probably can just contribute a PR. |
Agree with @efiop I will comment that fsspec is an unusual library, because it has a definite "end user" API of public functions/methods (as in the docs) and a whole load of other stuff that is used by other libraries or implementations that build on fsspec. In addition, the async methods of an async implementation also start with "_" to show they are special, but not hidden/private. Perhaps a better convention could have been chosen. |
I'm aware of this convention for the sync vs async But |
If it's safe to assume |
The best way to make sure that it is safe is to write a test against it and add docstrings/comments to the code itself. I would say it is not planned for any changes, in its existence or the signature, however. |
Being able to get the configured or system default batch size from fsspec is useful when using filesystems that support an additional level of concurrency (beyond the existing fs methods that support file batching like
get()
/put()
).See: adlfs, which supports setting concurrency for chunked/multipart uploads and downloads (and in this case concurrency is handled by sending a batch size to the underlying Azure SDK, scheduling the individual chunk upload/download in adlfs with
_run_coros_in_chunks()
is not an option)._get_batch_size()
is currently marked as protected (with the leading_
) and internally only gets called inasyn._run_coros_in_chunks()
, but it would be better if fsspec exposed a public method for getting the configured batch sizeThe text was updated successfully, but these errors were encountered: