hf-xet 1.1.6.dev0__tar.gz → 1.1.6.dev2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/PKG-INFO +1 -1
  2. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/Cargo.toml +1 -0
  3. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/remote_client.rs +52 -28
  4. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/file_downloader.rs +2 -1
  5. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/Cargo.lock +13 -11
  6. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/Cargo.toml +2 -1
  7. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/lib.rs +11 -2
  8. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/Cargo.toml +0 -0
  9. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/LICENSE +0 -0
  10. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/README.md +0 -0
  11. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/constants.rs +0 -0
  12. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/download_utils.rs +0 -0
  13. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/error.rs +0 -0
  14. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/exports.rs +0 -0
  15. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/http_client/dns_utils.rs +0 -0
  16. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/http_client.rs +0 -0
  17. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/interface.rs +0 -0
  18. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/lib.rs +0 -0
  19. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/local_client.rs +0 -0
  20. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/output_provider.rs +0 -0
  21. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/retry_wrapper.rs +0 -0
  22. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_client/src/upload_progress_stream.rs +0 -0
  23. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/Cargo.toml +0 -0
  24. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/benches/bg_split_regroup_bench.rs +0 -0
  25. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/benches/compression_bench.rs +0 -0
  26. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/byte_grouping/bg4.rs +0 -0
  27. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/byte_grouping/bg4_prediction.rs +0 -0
  28. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/byte_grouping/bg4_prediction_benchmark.rs +0 -0
  29. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/byte_grouping/compression_stats/collect_compression_stats.rs +0 -0
  30. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/byte_grouping/compression_stats/compression_prediction_tests.py +0 -0
  31. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/byte_grouping/mod.rs +0 -0
  32. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/cas_chunk_format/deserialize_async.rs +0 -0
  33. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/cas_chunk_format.rs +0 -0
  34. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/cas_object_format.rs +0 -0
  35. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/compression_scheme.rs +0 -0
  36. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/constants.rs +0 -0
  37. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/error.rs +0 -0
  38. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_object/src/lib.rs +0 -0
  39. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_types/Cargo.toml +0 -0
  40. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_types/src/error.rs +0 -0
  41. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_types/src/key.rs +0 -0
  42. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/cas_types/src/lib.rs +0 -0
  43. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/.gitignore +0 -0
  44. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/Cargo.toml +0 -0
  45. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/bin/analysis.rs +0 -0
  46. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/cache_manager.rs +0 -0
  47. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/disk/cache_file_header.rs +0 -0
  48. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/disk/cache_item.rs +0 -0
  49. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/disk/test_utils.rs +0 -0
  50. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/disk.rs +0 -0
  51. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/error.rs +0 -0
  52. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/chunk_cache/src/lib.rs +0 -0
  53. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/Cargo.toml +0 -0
  54. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/bin/example.rs +0 -0
  55. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/bin/xtool.rs +0 -0
  56. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/configurations.rs +0 -0
  57. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/constants.rs +0 -0
  58. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/data_client.rs +0 -0
  59. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/deduplication_interface.rs +0 -0
  60. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/errors.rs +0 -0
  61. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/file_cleaner.rs +0 -0
  62. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/file_upload_session.rs +0 -0
  63. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/lib.rs +0 -0
  64. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/migration_tool/hub_client.rs +0 -0
  65. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/migration_tool/migrate.rs +0 -0
  66. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/migration_tool/mod.rs +0 -0
  67. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/prometheus_metrics.rs +0 -0
  68. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/remote_client_interface.rs +0 -0
  69. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/sha256.rs +0 -0
  70. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/shard_interface.rs +0 -0
  71. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/test_utils.rs +0 -0
  72. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/src/xet_file.rs +0 -0
  73. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/tests/integration_tests/initialize.sh +0 -0
  74. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/tests/integration_tests/test_basic_clean_smudge.sh +0 -0
  75. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/tests/integration_tests.rs +0 -0
  76. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/tests/test_clean_smudge.rs +0 -0
  77. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/data/tests/test_session_resume.rs +0 -0
  78. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/Cargo.toml +0 -0
  79. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/chunk.rs +0 -0
  80. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/chunking.rs +0 -0
  81. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/constants.rs +0 -0
  82. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/data_aggregator.rs +0 -0
  83. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/dedup_metrics.rs +0 -0
  84. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/defrag_prevention.rs +0 -0
  85. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/file_deduplication.rs +0 -0
  86. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/interface.rs +0 -0
  87. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/lib.rs +0 -0
  88. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/parallel chunking.lyx +0 -0
  89. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/parallel chunking.pdf +0 -0
  90. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/deduplication/src/raw_xorb_data.rs +0 -0
  91. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/error_printer/Cargo.toml +0 -0
  92. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/error_printer/src/lib.rs +0 -0
  93. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/error_printer/tests/test_error.rs +0 -0
  94. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/error_printer/tests/test_option.rs +0 -0
  95. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/file_utils/Cargo.toml +0 -0
  96. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/file_utils/src/file_metadata.rs +0 -0
  97. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/file_utils/src/lib.rs +0 -0
  98. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/file_utils/src/privilege_context.rs +0 -0
  99. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/file_utils/src/safe_file_creator.rs +0 -0
  100. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/.gitignore +0 -0
  101. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/LICENSE +0 -0
  102. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/README.md +0 -0
  103. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/python/.gitkeep +0 -0
  104. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/log.rs +0 -0
  105. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/log_buffer.rs +0 -0
  106. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/profiling.rs +0 -0
  107. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/progress_update.rs +0 -0
  108. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/runtime.rs +0 -0
  109. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/hf_xet/src/token_refresh.rs +0 -0
  110. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/Cargo.toml +0 -0
  111. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/cas_structs.rs +0 -0
  112. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/chunk_verification.rs +0 -0
  113. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/constants.rs +0 -0
  114. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/error.rs +0 -0
  115. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/file_structs.rs +0 -0
  116. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/interpolation_search.rs +0 -0
  117. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/lib.rs +0 -0
  118. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/session_directory.rs +0 -0
  119. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/set_operations.rs +0 -0
  120. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_benchmark.rs +0 -0
  121. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_file.rs +0 -0
  122. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_file_handle.rs +0 -0
  123. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_file_manager.rs +0 -0
  124. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_file_reconstructor.rs +0 -0
  125. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_format.rs +0 -0
  126. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/shard_in_memory.rs +0 -0
  127. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/streaming_shard.rs +0 -0
  128. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/mdb_shard/src/utils.rs +0 -0
  129. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/merklehash/Cargo.toml +0 -0
  130. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/merklehash/src/aggregated_hashes.rs +0 -0
  131. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/merklehash/src/data_hash.rs +0 -0
  132. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/merklehash/src/lib.rs +0 -0
  133. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/parutils/Cargo.toml +0 -0
  134. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/parutils/src/lib.rs +0 -0
  135. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/parutils/src/parallel_utils.rs +0 -0
  136. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/Cargo.toml +0 -0
  137. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/aggregator.rs +0 -0
  138. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/item_tracking.rs +0 -0
  139. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/lib.rs +0 -0
  140. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/no_op_tracker.rs +0 -0
  141. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/progress_info.rs +0 -0
  142. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/upload_tracking.rs +0 -0
  143. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/progress_tracking/src/verification_wrapper.rs +0 -0
  144. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/pyproject.toml +0 -0
  145. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/Cargo.toml +0 -0
  146. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/README.md +0 -0
  147. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/async_iterator.rs +0 -0
  148. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/async_read.rs +0 -0
  149. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/auth.rs +0 -0
  150. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/constant_declarations.rs +0 -0
  151. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/errors.rs +0 -0
  152. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/lib.rs +0 -0
  153. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/limited_joinset.rs +0 -0
  154. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/output_bytes.rs +0 -0
  155. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/rw_task_lock.rs +0 -0
  156. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/serialization_utils.rs +0 -0
  157. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/utils/src/singleflight.rs +0 -0
  158. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/xet_threadpool/Cargo.toml +0 -0
  159. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/xet_threadpool/src/errors.rs +0 -0
  160. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/xet_threadpool/src/exports.rs +0 -0
  161. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/xet_threadpool/src/lib.rs +0 -0
  162. {hf_xet-1.1.6.dev0 → hf_xet-1.1.6.dev2}/xet_threadpool/src/threadpool.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hf-xet
3
- Version: 1.1.6.dev0
3
+ Version: 1.1.6.dev2
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -34,6 +34,7 @@ url = { workspace = true }
34
34
  lazy_static = { workspace = true }
35
35
  serde = { workspace = true }
36
36
  serde_json = { workspace = true }
37
+ rand = { workspace = true }
37
38
 
38
39
  reqwest-middleware = "0.4"
39
40
  reqwest-retry = "0.7"
@@ -291,7 +291,7 @@ impl RemoteClient {
291
291
  // at the beginning of the download, but queried in segments. Range downloads are executed with
292
292
  // a certain degree of parallelism, but writing out to storage is sequential. Ideal when the external
293
293
  // storage uses HDDs.
294
- #[instrument(skip_all, name = "RemoteClient::reconstruct_file_segmented", fields(file.hash = file_hash.hex()
294
+ #[instrument(skip_all, name = "RemoteClient::reconstruct_file_segmented", fields(file.hash = file_hash.hex(), file.range = format!("{byte_range:?}")
295
295
  ))]
296
296
  async fn reconstruct_file_to_writer_segmented(
297
297
  &self,
@@ -300,6 +300,7 @@ impl RemoteClient {
300
300
  writer: &OutputProvider,
301
301
  progress_updater: Option<Arc<SingleItemProgressUpdater>>,
302
302
  ) -> Result<u64> {
303
+ eprintln!("Attempting to download file={file_hash:?} with range {byte_range:?}.");
303
304
  // queue size is inherently bounded by degree of concurrency.
304
305
  let (task_tx, mut task_rx) = mpsc::unbounded_channel::<DownloadQueueItem<SequentialTermDownload>>();
305
306
  let (running_downloads_tx, mut running_downloads_rx) =
@@ -336,18 +337,23 @@ impl RemoteClient {
336
337
  match item {
337
338
  DownloadQueueItem::End => {
338
339
  // everything processed
339
- debug!("download queue emptied");
340
+ eprintln!("download queue emptied");
340
341
  drop(running_downloads_tx);
341
342
  break;
342
343
  },
343
344
  DownloadQueueItem::DownloadTask(term_download) => {
344
345
  // acquire the permit before spawning the task, so that there's limited
345
346
  // number of active downloads.
347
+
348
+ use rand::Rng;
349
+ let x: u64 = rand::rng().random();
350
+ eprintln!("{x:x}: Acquiring download permit.");
346
351
  let permit = DOWNLOAD_CONNECTION_CONCURRENCY_LIMITER.clone().acquire_owned().await?;
347
- debug!("spawning 1 download task");
352
+ eprintln!("{x:x}: Permit acquried: spawning 1 download task");
348
353
  let future: JoinHandle<Result<(TermDownloadResult<Vec<u8>>, OwnedSemaphorePermit)>> =
349
354
  tokio::spawn(async move {
350
355
  let data = term_download.run().await?;
356
+ eprintln!("{x:x}: Download task completed.");
351
357
  Ok((data, permit))
352
358
  });
353
359
  running_downloads_tx.send(future)?;
@@ -355,7 +361,7 @@ impl RemoteClient {
355
361
  DownloadQueueItem::Metadata(fetch_info) => {
356
362
  // query for the file info of the first segment
357
363
  let segment_size = download_scheduler_clone.next_segment_size()?;
358
- debug!("querying file info of size {segment_size}");
364
+ eprintln!("querying file info of size {segment_size}");
359
365
  let (segment, maybe_remainder) = fetch_info.take_segment(segment_size);
360
366
 
361
367
  let Some((offset_into_first_range, terms)) = segment.query().await? else {
@@ -367,7 +373,7 @@ impl RemoteClient {
367
373
  let segment = Arc::new(segment);
368
374
  // define the term download tasks
369
375
  let mut remaining_segment_len = segment_size;
370
- debug!("enqueueing {} download tasks", terms.len());
376
+ eprintln!("enqueueing {} download tasks", terms.len());
371
377
  for (i, term) in terms.into_iter().enumerate() {
372
378
  let skip_bytes = if i == 0 { offset_into_first_range } else { 0 };
373
379
  let take = remaining_total_len
@@ -391,7 +397,7 @@ impl RemoteClient {
391
397
 
392
398
  remaining_total_len -= take;
393
399
  remaining_segment_len -= take;
394
- debug!("enqueueing {download_task:?}");
400
+ eprintln!("enqueueing {download_task:?}");
395
401
  task_tx.send(DownloadQueueItem::DownloadTask(download_task))?;
396
402
  }
397
403
 
@@ -409,31 +415,49 @@ impl RemoteClient {
409
415
  });
410
416
 
411
417
  let mut writer = writer.get_writer_at(0)?;
412
- let mut total_written = 0;
413
- while let Some(result) = running_downloads_rx.recv().await {
414
- match result.await {
415
- Ok(Ok((mut download_result, permit))) => {
416
- let data = take(&mut download_result.payload);
417
- writer.write_all(&data)?;
418
- // drop permit after data written out so they don't accumulate in memory unbounded
419
- drop(permit);
420
-
421
- if let Some(updater) = progress_updater.as_ref() {
422
- updater.update(data.len() as u64).await;
423
- }
424
418
 
425
- total_written += data.len() as u64;
419
+ let write_task = tokio::spawn(async move {
420
+ let mut total_written = 0;
421
+ while let Some(result) = running_downloads_rx.recv().await {
422
+ match result.await {
423
+ Ok(Ok((mut download_result, permit))) => {
424
+ eprintln!(
425
+ "Task receive loop: Received ok result with data of size {}",
426
+ download_result.payload.len()
427
+ );
428
+ let data = take(&mut download_result.payload);
429
+ writer.write_all(&data)?;
430
+ // drop permit after data written out so they don't accumulate in memory unbounded
431
+ drop(permit);
432
+
433
+ if let Some(updater) = progress_updater.as_ref() {
434
+ updater.update(data.len() as u64).await;
435
+ }
436
+
437
+ total_written += data.len() as u64;
426
438
 
427
- // Now inspect the download metrics and tune the download degree of concurrency
428
- download_scheduler.tune_on(download_result)?;
429
- },
430
- Ok(Err(e)) => Err(e)?,
431
- Err(e) => Err(anyhow!("{e:?}"))?,
439
+ // Now inspect the download metrics and tune the download degree of concurrency
440
+ download_scheduler.tune_on(download_result)?;
441
+ },
442
+ Ok(Err(e)) => {
443
+ eprintln!("Task receive loop: Received error result: {e:?}");
444
+ Err(e)?
445
+ },
446
+ Err(e) => Err(anyhow!("{e:?}"))?,
447
+ }
432
448
  }
433
- }
434
- writer.flush()?;
449
+ eprintln!("Task receive loop exited.");
450
+ writer.flush()?;
451
+
452
+ Result::Ok(total_written)
453
+ });
454
+
455
+ eprintln!("Both tasks spawned; waiting.");
456
+ let (write_res, queue_res) = tokio::join! {write_task, queue_dispatcher};
435
457
 
436
- queue_dispatcher.await??;
458
+ queue_res??;
459
+ let total_written = write_res??;
460
+ eprintln!("Finished; total_written=total_written.");
437
461
 
438
462
  Ok(total_written)
439
463
  }
@@ -724,7 +748,7 @@ impl Client for RemoteClient {
724
748
  ) -> Result<u64> {
725
749
  // If the user has set the `HF_XET_RECONSTRUCT_WRITE_SEQUENTIALLY=true` env variable, then we
726
750
  // should write the file to the output sequentially instead of in parallel.
727
- if *RECONSTRUCT_WRITE_SEQUENTIALLY {
751
+ if true || *RECONSTRUCT_WRITE_SEQUENTIALLY {
728
752
  info!("reconstruct terms sequentially");
729
753
  self.reconstruct_file_to_writer_segmented(hash, byte_range, output_provider, progress_updater)
730
754
  .await
@@ -37,7 +37,7 @@ impl FileDownloader {
37
37
  Ok(Self { config, client })
38
38
  }
39
39
 
40
- #[instrument(skip_all, name = "FileDownloader::smudge_file_from_hash", fields(hash=file_id.hex()))]
40
+ #[instrument(skip_all, name = "FileDownloader::smudge_file_from_hash", fields(hash=file_id.hex(), file_name = file_name.to_string(), range = format!("{:?}", range)))]
41
41
  pub async fn smudge_file_from_hash(
42
42
  &self,
43
43
  file_id: &MerkleHash,
@@ -46,6 +46,7 @@ impl FileDownloader {
46
46
  range: Option<FileRange>,
47
47
  progress_updater: Option<Arc<ItemProgressUpdater>>,
48
48
  ) -> Result<u64> {
49
+ eprintln!("Attempting to download {file_name:?}, range={range:?},file_id={file_id:?}");
49
50
  let file_progress_tracker = progress_updater.map(|p| ItemProgressUpdater::item_tracker(&p, file_name, None));
50
51
 
51
52
  // Currently, this works by always directly querying the remote server.
@@ -277,6 +277,7 @@ dependencies = [
277
277
  "merklehash",
278
278
  "more-asserts",
279
279
  "progress_tracking",
280
+ "rand 0.9.2",
280
281
  "reqwest",
281
282
  "reqwest-middleware",
282
283
  "reqwest-retry",
@@ -311,7 +312,7 @@ dependencies = [
311
312
  "mdb_shard",
312
313
  "merklehash",
313
314
  "more-asserts",
314
- "rand 0.9.1",
315
+ "rand 0.9.2",
315
316
  "serde",
316
317
  "thiserror 2.0.12",
317
318
  "tokio",
@@ -384,7 +385,7 @@ dependencies = [
384
385
  "merklehash",
385
386
  "mockall",
386
387
  "once_cell",
387
- "rand 0.9.1",
388
+ "rand 0.9.2",
388
389
  "thiserror 2.0.12",
389
390
  "tokio",
390
391
  "tracing",
@@ -625,7 +626,7 @@ dependencies = [
625
626
  "parutils",
626
627
  "progress_tracking",
627
628
  "prometheus",
628
- "rand 0.9.1",
629
+ "rand 0.9.2",
629
630
  "rand_chacha 0.9.0",
630
631
  "regex",
631
632
  "serde",
@@ -809,7 +810,7 @@ dependencies = [
809
810
  "colored",
810
811
  "lazy_static",
811
812
  "libc",
812
- "rand 0.9.1",
813
+ "rand 0.9.2",
813
814
  "tracing",
814
815
  "whoami",
815
816
  "winapi",
@@ -1079,7 +1080,7 @@ checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
1079
1080
 
1080
1081
  [[package]]
1081
1082
  name = "hf_xet"
1082
- version = "1.1.6-dev0"
1083
+ version = "1.1.6-dev2"
1083
1084
  dependencies = [
1084
1085
  "async-trait",
1085
1086
  "bipbuffer",
@@ -1093,6 +1094,7 @@ dependencies = [
1093
1094
  "pprof",
1094
1095
  "progress_tracking",
1095
1096
  "pyo3",
1097
+ "rand 0.9.2",
1096
1098
  "serde",
1097
1099
  "serde_json",
1098
1100
  "signal-hook",
@@ -1581,7 +1583,7 @@ dependencies = [
1581
1583
  "itertools 0.14.0",
1582
1584
  "lazy_static",
1583
1585
  "merklehash",
1584
- "rand 0.9.1",
1586
+ "rand 0.9.2",
1585
1587
  "regex",
1586
1588
  "serde",
1587
1589
  "static_assertions",
@@ -1625,7 +1627,7 @@ dependencies = [
1625
1627
  "blake3",
1626
1628
  "getrandom 0.3.3",
1627
1629
  "heed",
1628
- "rand 0.9.1",
1630
+ "rand 0.9.2",
1629
1631
  "safe-transmute",
1630
1632
  "serde",
1631
1633
  ]
@@ -2269,7 +2271,7 @@ dependencies = [
2269
2271
  "bytes",
2270
2272
  "getrandom 0.3.3",
2271
2273
  "lru-slab",
2272
- "rand 0.9.1",
2274
+ "rand 0.9.2",
2273
2275
  "ring",
2274
2276
  "rustc-hash",
2275
2277
  "rustls",
@@ -2323,9 +2325,9 @@ dependencies = [
2323
2325
 
2324
2326
  [[package]]
2325
2327
  name = "rand"
2326
- version = "0.9.1"
2328
+ version = "0.9.2"
2327
2329
  source = "registry+https://github.com/rust-lang/crates.io-index"
2328
- checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
2330
+ checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1"
2329
2331
  dependencies = [
2330
2332
  "rand_chacha 0.9.0",
2331
2333
  "rand_core 0.9.3",
@@ -3341,7 +3343,7 @@ version = "1.2.1"
3341
3343
  source = "registry+https://github.com/rust-lang/crates.io-index"
3342
3344
  checksum = "470dbf6591da1b39d43c14523b2b469c86879a53e8b758c8e090a470fe7b1fbe"
3343
3345
  dependencies = [
3344
- "rand 0.9.1",
3346
+ "rand 0.9.2",
3345
3347
  "web-time",
3346
3348
  ]
3347
3349
 
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "hf_xet"
3
- version = "1.1.6-dev0"
3
+ version = "1.1.6-dev2"
4
4
  edition = "2021"
5
5
  license = "Apache-2.0"
6
6
 
@@ -44,6 +44,7 @@ tracing-subscriber = { version = "0.3", features = [
44
44
  "env-filter",
45
45
  ] }
46
46
  tracing-appender = "0.2"
47
+ rand = "0.9.2"
47
48
 
48
49
  # Unix-specific dependencies
49
50
  [target.'cfg(unix)'.dependencies]
@@ -107,14 +107,23 @@ pub fn download_files(
107
107
  let refresher = token_refresher.map(WrappedTokenRefresher::from_func).transpose()?.map(Arc::new);
108
108
  let updaters = progress_updater.map(try_parse_progress_updaters).transpose()?;
109
109
 
110
- async_run(py, async move {
110
+ use rand::Rng;
111
+
112
+ let x: u64 = rand::rng().random();
113
+ eprintln!("{x:x}: Downloading files {file_infos:?}");
114
+
115
+ let res = async_run(py, async move {
111
116
  let out: Vec<String> =
112
117
  data_client::download_async(file_infos, endpoint, token_info, refresher.map(|v| v as Arc<_>), updaters)
113
118
  .await
114
119
  .map_err(convert_data_processing_error)?;
115
120
 
116
121
  PyResult::Ok(out)
117
- })
122
+ });
123
+
124
+ eprintln!("{x:x}: Completed.");
125
+
126
+ res
118
127
  }
119
128
 
120
129
  fn try_parse_progress_updaters(funcs: Vec<Py<PyAny>>) -> PyResult<Vec<Arc<dyn TrackingProgressUpdater>>> {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes