Skip to content

Commit

Permalink
Merge pull request #6 from huggingface/thomas/document_num_threads
Browse files Browse the repository at this point in the history
Document how to tune the number of threads one can use in hf_transfer
  • Loading branch information
Narsil authored Mar 16, 2023
2 parents eea07e3 + 6b37ce0 commit 58be1c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use tokio::time::sleep;

/// parallel_failures: Number of maximum failures of different chunks in parallel (cannot exceed max_files)
/// max_retries: Number of maximum attempts per chunk. (Retries are exponentially backed off + jitter)
/// number of threads can be tuned by environment variable `TOKIO_WORKER_THREADS` as documented in https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.worker_threads
#[pyfunction]
#[pyo3(signature = (url, filename, max_files, chunk_size, parallel_failures=0, max_retries=0))]
fn download(
Expand Down

0 comments on commit 58be1c6

Please sign in to comment.