tracebloc 4.0.1__tar.gz → 4.0.2__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 (211) hide show
  1. {tracebloc-4.0.1 → tracebloc-4.0.2}/PKG-INFO +1 -1
  2. {tracebloc-4.0.1 → tracebloc-4.0.2}/pyproject.toml +1 -1
  3. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/client.py +120 -18
  4. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc.egg-info/PKG-INFO +1 -1
  5. {tracebloc-4.0.1 → tracebloc-4.0.2}/MANIFEST.in +0 -0
  6. {tracebloc-4.0.1 → tracebloc-4.0.2}/README.md +0 -0
  7. {tracebloc-4.0.1 → tracebloc-4.0.2}/license.txt +0 -0
  8. {tracebloc-4.0.1 → tracebloc-4.0.2}/setup.cfg +0 -0
  9. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/__init__.py +0 -0
  10. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/_linking.py +0 -0
  11. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/_upload_conversion.py +0 -0
  12. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/api/__init__.py +0 -0
  13. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/api/experiment_status.py +0 -0
  14. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/api/responses.py +0 -0
  15. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/auth/__init__.py +0 -0
  16. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/auth/env_login.py +0 -0
  17. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/checks.py +0 -0
  18. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/compat/__init__.py +0 -0
  19. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/compat/deprecation.py +0 -0
  20. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/compat/frameworks.py +0 -0
  21. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/config.py +0 -0
  22. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/contracts/stage_urls.v1.json +0 -0
  23. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/contracts/stage_urls.v1.source.json +0 -0
  24. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/contracts/survival_payload.py +0 -0
  25. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/contracts/training_requirements.source.json +0 -0
  26. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/contracts/training_requirements.txt +0 -0
  27. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/__init__.py +0 -0
  28. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/acceptance.py +0 -0
  29. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/__init__.py +0 -0
  30. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/hf/__init__.py +0 -0
  31. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/hf/_build.py +0 -0
  32. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/hf/_model_type.py +0 -0
  33. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/tabular.py +0 -0
  34. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/vision/__init__.py +0 -0
  35. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/families/vision/_matching.py +0 -0
  36. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/gate.py +0 -0
  37. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/heads.py +0 -0
  38. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/interfaces.py +0 -0
  39. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/licence/__init__.py +0 -0
  40. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/licence/spdx.py +0 -0
  41. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/outputs.py +0 -0
  42. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/__init__.py +0 -0
  43. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/arguments.py +0 -0
  44. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/assemble.py +0 -0
  45. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/checkpoint.py +0 -0
  46. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/gate_rules.py +0 -0
  47. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/generate.py +0 -0
  48. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/head.py +0 -0
  49. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/import_check.py +0 -0
  50. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/layer0.py +0 -0
  51. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/live.py +0 -0
  52. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/model_class.py +0 -0
  53. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/remote.py +0 -0
  54. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/repo.py +0 -0
  55. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/shake.py +0 -0
  56. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/owncode/source_tree.py +0 -0
  57. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/package.py +0 -0
  58. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/padding.py +0 -0
  59. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/report.py +0 -0
  60. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/tokenizers.py +0 -0
  61. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/convert/training_versions.py +0 -0
  62. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/__init__.py +0 -0
  63. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/base.py +0 -0
  64. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/detection.py +0 -0
  65. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/keypoint_detection.py +0 -0
  66. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/semantic_segmentation.py +0 -0
  67. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/tabular.py +0 -0
  68. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/text.py +0 -0
  69. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/time_series.py +0 -0
  70. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/datasets/time_to_event.py +0 -0
  71. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/downloads/lifelines_weights.py +0 -0
  72. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/downloads/seed_weights.py +0 -0
  73. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/env_login.py +0 -0
  74. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/exceptions.py +0 -0
  75. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/fetch.py +0 -0
  76. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/inference.py +0 -0
  77. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/library_fetch.py +0 -0
  78. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/lifelines_weights.py +0 -0
  79. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/link_model_dataset.py +0 -0
  80. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/__init__.py +0 -0
  81. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/answer.py +0 -0
  82. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/augmentation_methods.py +0 -0
  83. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/check_model.py +0 -0
  84. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/conversion.py +0 -0
  85. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/data_methods.py +0 -0
  86. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/library.py +0 -0
  87. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/model_dataset.py +0 -0
  88. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/regeneration.py +0 -0
  89. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/response.py +0 -0
  90. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/stored.py +0 -0
  91. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/training_methods.py +0 -0
  92. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/linking/user_methods.py +0 -0
  93. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/__init__.py +0 -0
  94. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/_partials.tpl +0 -0
  95. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/embeddings.tpl +0 -0
  96. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/nlp_finetune.tpl +0 -0
  97. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/nlp_generative.tpl +0 -0
  98. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/survival.tpl +0 -0
  99. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/tabular_timeseries.tpl +0 -0
  100. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/notebook/templates/vision_from_scratch.tpl +0 -0
  101. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/__init__.py +0 -0
  102. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/classes.py +0 -0
  103. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/declaration.py +0 -0
  104. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/fitted_model.py +0 -0
  105. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/frame_recording.py +0 -0
  106. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/link_check.py +0 -0
  107. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/pairs.py +0 -0
  108. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/schema.py +0 -0
  109. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/seed_prefixes.py +0 -0
  110. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/sklearn_check.py +0 -0
  111. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/survival.py +0 -0
  112. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/torch_checks.py +0 -0
  113. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/raw_mode/width_note.py +0 -0
  114. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/__init__.py +0 -0
  115. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/augmentation.py +0 -0
  116. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/callbacks.py +0 -0
  117. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/converted.py +0 -0
  118. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/features.py +0 -0
  119. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/image_channels.py +0 -0
  120. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/image_size.py +0 -0
  121. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/link_total.py +0 -0
  122. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/lora.py +0 -0
  123. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/lora_validation.py +0 -0
  124. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/loss.py +0 -0
  125. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/loss_policy.py +0 -0
  126. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/loss_source.py +0 -0
  127. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/memory_estimate.py +0 -0
  128. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/memory_sizing.py +0 -0
  129. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/plan.py +0 -0
  130. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/preprocessing.py +0 -0
  131. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/shape.py +0 -0
  132. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/subdataset.py +0 -0
  133. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/submitter.py +0 -0
  134. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/training/summary.py +0 -0
  135. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/__init__.py +0 -0
  136. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/lifelines_time_to_event.py +0 -0
  137. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/loss_config.py +0 -0
  138. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/model_params.py +0 -0
  139. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/model_upload.py +0 -0
  140. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/nlp_probes.py +0 -0
  141. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/scikit_survival_time_to_event.py +0 -0
  142. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/sequence_length.py +0 -0
  143. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/skl_tabular_base.py +0 -0
  144. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/skl_tabular_classifier.py +0 -0
  145. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/skl_tabular_regression.py +0 -0
  146. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/statistical_base.py +0 -0
  147. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/survival_base.py +0 -0
  148. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_causal_language_modeler.py +0 -0
  149. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_embeddings.py +0 -0
  150. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_handler.py +0 -0
  151. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_image_classifier.py +0 -0
  152. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_key_point_detector.py +0 -0
  153. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_masked_language_modeler.py +0 -0
  154. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_multi_label_text_classifier.py +0 -0
  155. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_nlp_base.py +0 -0
  156. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_object_detector.py +0 -0
  157. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_semantic_segmentation.py +0 -0
  158. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_sentence_pair_classifier.py +0 -0
  159. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_seq2seq_modeler.py +0 -0
  160. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_tabular_classifier.py +0 -0
  161. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_tabular_regression.py +0 -0
  162. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_text_classifier.py +0 -0
  163. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_text_regressor.py +0 -0
  164. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_time_series_classifier.py +0 -0
  165. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_time_series_forecaster.py +0 -0
  166. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_time_to_event.py +0 -0
  167. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/torch_token_classifier.py +0 -0
  168. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/user_methods.py +0 -0
  169. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/weight_loaders.py +0 -0
  170. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/weights_averaging.py +0 -0
  171. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/weights_check.py +0 -0
  172. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/upload/weights_parts.py +0 -0
  173. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/user.py +0 -0
  174. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/__init__.py +0 -0
  175. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/class_order.py +0 -0
  176. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/constants.py +0 -0
  177. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/custom_loss_probe.py +0 -0
  178. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/data_probes.py +0 -0
  179. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/declared_classes.py +0 -0
  180. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/declared_cls.py +0 -0
  181. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/detection_utils.py +0 -0
  182. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/device.py +0 -0
  183. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/entry_point.py +0 -0
  184. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/errors.py +0 -0
  185. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/feature_dict.py +0 -0
  186. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/model_loading.py +0 -0
  187. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/model_params.py +0 -0
  188. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/registry.py +0 -0
  189. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/resources.py +0 -0
  190. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/safetensors_io.py +0 -0
  191. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/staging.py +0 -0
  192. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/tabular_classification_utils.py +0 -0
  193. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/tabular_custom_loss_utils.py +0 -0
  194. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/tabular_regression_utils.py +0 -0
  195. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/text_classification_utils.py +0 -0
  196. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/time_series_utils.py +0 -0
  197. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/time_to_event_utils.py +0 -0
  198. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/utils/warnings_once.py +0 -0
  199. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/__init__.py +0 -0
  200. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/checker.py +0 -0
  201. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/estimator_checks.py +0 -0
  202. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/header_rules.py +0 -0
  203. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/lifelines_checks.py +0 -0
  204. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/pytorch_checks.py +0 -0
  205. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/rewriter.py +0 -0
  206. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/scikit_survival_checks.py +0 -0
  207. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc/validation/sklearn_checks.py +0 -0
  208. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc.egg-info/SOURCES.txt +0 -0
  209. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc.egg-info/dependency_links.txt +0 -0
  210. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc.egg-info/requires.txt +0 -0
  211. {tracebloc-4.0.1 → tracebloc-4.0.2}/tracebloc.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracebloc
3
- Version: 4.0.1
3
+ Version: 4.0.2
4
4
  Summary: Build AI with anyone. On data that can't move. SDK for the tracebloc collaborative AI workspace.
5
5
  Author-email: tracebloc <lukas@tracebloc.io>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tracebloc"
7
- version = "4.0.1"
7
+ version = "4.0.2"
8
8
  description = "Build AI with anyone. On data that can't move. SDK for the tracebloc collaborative AI workspace."
9
9
  license = "MIT"
10
10
  license-files = ["license.txt"]
@@ -23,6 +23,13 @@ are **not** automatically retried, because a server-side 500 on an
23
23
  upload might still have persisted the model and a retry would create
24
24
  a duplicate. POST failures bubble up as :class:`APIError`; callers can
25
25
  implement idempotent retry at their layer if they want.
26
+
27
+ **Overload (HTTP 429):** the backend sheds load with ``429`` plus
28
+ ``Retry-After``. A rejected request was not processed, so reads
29
+ (``GET``/``HEAD``/``OPTIONS``) and login wait the stated time and retry
30
+ (:func:`_send_honouring_429`: each wait capped at :data:`MAX_RETRY_WAIT_SECONDS`,
31
+ all waits at :data:`MAX_TOTAL_WAIT_SECONDS`). Past the budget, and at once for
32
+ every other call, the failure says the service is busy (:data:`BUSY_MESSAGE`).
26
33
  """
27
34
 
28
35
  from __future__ import annotations
@@ -31,7 +38,11 @@ from typing import Any, Dict, Mapping, Optional
31
38
 
32
39
  import json as _json
33
40
  import platform
41
+ import time
42
+ from datetime import datetime, timezone
43
+ from email.utils import parsedate_to_datetime
34
44
  from importlib import metadata as _metadata
45
+ from typing import Callable
35
46
 
36
47
  import requests
37
48
  from requests.adapters import HTTPAdapter
@@ -76,13 +87,83 @@ SDK_VERSION = _sdk_version()
76
87
  USER_AGENT = f"tracebloc-sdk/{SDK_VERSION} (python/{platform.python_version()})"
77
88
 
78
89
 
90
+ #: Longest single ``Retry-After`` wait, and the most an SDK call waits in total.
91
+ MAX_RETRY_WAIT_SECONDS = 60.0
92
+ MAX_TOTAL_WAIT_SECONDS = 180.0
93
+
94
+ #: Wait when a 429 names no usable ``Retry-After``; also the shortest wait taken,
95
+ #: so a ``Retry-After: 0`` still spends the budget and the loop ends.
96
+ _DEFAULT_RETRY_WAIT_SECONDS = 1.0
97
+
98
+ #: Methods that are re-sent on a 429 (reads); login is re-sent explicitly.
99
+ _RETRY_ON_429_METHODS = frozenset({"GET", "HEAD", "OPTIONS"})
100
+
101
+ #: What a 429 reads as once the SDK has stopped waiting, or does not wait.
102
+ BUSY_MESSAGE = (
103
+ "The tracebloc service is busy right now (HTTP 429). "
104
+ "Please retry in a few minutes."
105
+ )
106
+
107
+ # Indirection so tests can run the waits without sleeping.
108
+ _sleep = time.sleep
109
+
110
+
111
+ def _retry_after_seconds(response: requests.Response) -> float:
112
+ """Seconds a 429 asks us to wait: ``Retry-After`` as delay-seconds or an
113
+ HTTP date; a default when absent or unreadable. Never negative."""
114
+ raw = response.headers.get("Retry-After")
115
+ if isinstance(raw, str) and raw.strip():
116
+ raw = raw.strip()
117
+ try:
118
+ return max(0.0, float(raw))
119
+ except ValueError:
120
+ pass
121
+ try:
122
+ when = parsedate_to_datetime(raw)
123
+ if when.tzinfo is None:
124
+ when = when.replace(tzinfo=timezone.utc)
125
+ return max(0.0, (when - datetime.now(timezone.utc)).total_seconds())
126
+ except (TypeError, ValueError):
127
+ pass
128
+ return _DEFAULT_RETRY_WAIT_SECONDS
129
+
130
+
131
+ def _send_honouring_429(
132
+ send: Callable[[], requests.Response], *, retry: bool
133
+ ) -> requests.Response:
134
+ """Run ``send``; on a 429 with ``retry`` wait ``Retry-After`` and run it
135
+ again until the budget (:data:`MAX_TOTAL_WAIT_SECONDS`) is spent.
136
+
137
+ Returns the last response, which may still be a 429 for the caller's
138
+ error handling. The wait that would overrun the budget is not taken.
139
+ """
140
+ waited = 0.0
141
+ while True:
142
+ response = send()
143
+ if response.status_code != 429 or not retry:
144
+ return response
145
+ wait = min(
146
+ max(_retry_after_seconds(response), _DEFAULT_RETRY_WAIT_SECONDS),
147
+ MAX_RETRY_WAIT_SECONDS,
148
+ )
149
+ if waited + wait > MAX_TOTAL_WAIT_SECONDS:
150
+ return response
151
+ response.close()
152
+ _sleep(wait)
153
+ waited += wait
154
+
155
+
79
156
  def _error_message(response: requests.Response) -> str:
80
157
  """The user-facing message for a non-2xx response.
81
158
 
82
159
  A 426 is the backend refusing this SDK as older than the oldest it
83
160
  supports (``{"error": "upgrade_required", "min_version": ...}``); say
84
161
  that, with the fix, rather than the bare ``upgrade_required`` code.
162
+ A 429 is the backend shedding load: :data:`BUSY_MESSAGE`, never the
163
+ server's own wording.
85
164
  """
165
+ if response.status_code == 429:
166
+ return BUSY_MESSAGE
86
167
  if response.status_code == 426:
87
168
  try:
88
169
  body = response.json()
@@ -101,7 +182,21 @@ def _error_message(response: requests.Response) -> str:
101
182
  return _extract_error_message(response)
102
183
 
103
184
 
104
- _DEFAULT_RETRY = Retry(
185
+ class _Retry(Retry):
186
+ """urllib3 ``Retry`` that leaves a 429 alone.
187
+
188
+ A 429's ``Retry-After`` is honoured, capped, by ``_send_honouring_429``;
189
+ urllib3's own sleep on it is uncapped and would stack on that budget. The
190
+ header still governs a 503's wait.
191
+ """
192
+
193
+ def is_retry(self, method, status_code, has_retry_after=False):
194
+ if status_code == 429:
195
+ return False
196
+ return super().is_retry(method, status_code, has_retry_after)
197
+
198
+
199
+ _DEFAULT_RETRY = _Retry(
105
200
  total=3,
106
201
  backoff_factor=0.5,
107
202
  status_forcelist=(500, 502, 503, 504),
@@ -252,17 +347,21 @@ class TraceblocClient:
252
347
  # Only passed when asked for, so every existing call is issued exactly
253
348
  # as before.
254
349
  extra = {"stream": True} if stream else {}
350
+ verb = method.upper()
255
351
  try:
256
- response = self._session.request(
257
- method=method.upper(),
258
- url=url,
259
- data=data,
260
- json=json,
261
- files=files,
262
- params=params,
263
- headers=self._headers(headers),
264
- timeout=request_timeout,
265
- **extra,
352
+ response = _send_honouring_429(
353
+ lambda: self._session.request(
354
+ method=verb,
355
+ url=url,
356
+ data=data,
357
+ json=json,
358
+ files=files,
359
+ params=params,
360
+ headers=self._headers(headers),
361
+ timeout=request_timeout,
362
+ **extra,
363
+ ),
364
+ retry=verb in _RETRY_ON_429_METHODS,
266
365
  )
267
366
  except requests.RequestException as error:
268
367
  raise APIError(
@@ -312,13 +411,16 @@ class TraceblocClient:
312
411
  """
313
412
  url = self._url("api-token-auth/")
314
413
  try:
315
- response = self._session.post(
316
- url,
317
- data={"username": username, "password": password},
318
- # Not self._headers(): login must never carry a previous
319
- # session's Authorization, only who is calling.
320
- headers={"User-Agent": USER_AGENT},
321
- timeout=self._config.timeout_seconds,
414
+ response = _send_honouring_429(
415
+ lambda: self._session.post(
416
+ url,
417
+ data={"username": username, "password": password},
418
+ # Not self._headers(): login must never carry a previous
419
+ # session's Authorization, only who is calling.
420
+ headers={"User-Agent": USER_AGENT},
421
+ timeout=self._config.timeout_seconds,
422
+ ),
423
+ retry=True,
322
424
  )
323
425
  except requests.RequestException as error:
324
426
  raise APIError(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracebloc
3
- Version: 4.0.1
3
+ Version: 4.0.2
4
4
  Summary: Build AI with anyone. On data that can't move. SDK for the tracebloc collaborative AI workspace.
5
5
  Author-email: tracebloc <lukas@tracebloc.io>
6
6
  License-Expression: MIT
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes