tracebloc 1.2.44__tar.gz → 1.2.45__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 (101) hide show
  1. {tracebloc-1.2.44 → tracebloc-1.2.45}/PKG-INFO +1 -1
  2. {tracebloc-1.2.44 → tracebloc-1.2.45}/pyproject.toml +1 -1
  3. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/_linking.py +4 -28
  4. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/summary.py +14 -2
  5. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/model_upload.py +2 -3
  6. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/constants.py +40 -0
  7. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc.egg-info/PKG-INFO +1 -1
  8. {tracebloc-1.2.44 → tracebloc-1.2.45}/MANIFEST.in +0 -0
  9. {tracebloc-1.2.44 → tracebloc-1.2.45}/README.md +0 -0
  10. {tracebloc-1.2.44 → tracebloc-1.2.45}/license.txt +0 -0
  11. {tracebloc-1.2.44 → tracebloc-1.2.45}/setup.cfg +0 -0
  12. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/__init__.py +0 -0
  13. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/_deprecation.py +0 -0
  14. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/_framework_utils.py +0 -0
  15. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/_http_utils.py +0 -0
  16. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/_stored_link.py +0 -0
  17. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/checks.py +0 -0
  18. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/client.py +0 -0
  19. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/config.py +0 -0
  20. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/contracts/stage_urls.v1.json +0 -0
  21. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/contracts/stage_urls.v1.source.json +0 -0
  22. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/env_login.py +0 -0
  23. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/exceptions.py +0 -0
  24. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/fetch.py +0 -0
  25. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/link_model_dataset.py +0 -0
  26. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/__init__.py +0 -0
  27. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/_partials.tpl +0 -0
  28. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/embeddings.tpl +0 -0
  29. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/nlp_finetune.tpl +0 -0
  30. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/nlp_generative.tpl +0 -0
  31. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/survival.tpl +0 -0
  32. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/tabular_timeseries.tpl +0 -0
  33. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/notebook/templates/vision_from_scratch.tpl +0 -0
  34. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/seed_weights.py +0 -0
  35. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/__init__.py +0 -0
  36. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/augmentation.py +0 -0
  37. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/callbacks.py +0 -0
  38. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/features.py +0 -0
  39. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/lora.py +0 -0
  40. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/lora_validation.py +0 -0
  41. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/loss.py +0 -0
  42. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/memory_estimate.py +0 -0
  43. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/plan.py +0 -0
  44. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/preprocessing.py +0 -0
  45. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/shape.py +0 -0
  46. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/subdataset.py +0 -0
  47. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/training/submitter.py +0 -0
  48. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/__init__.py +0 -0
  49. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/lifelines_time_to_event.py +0 -0
  50. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/scikit_survival_time_to_event.py +0 -0
  51. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/skl_tabular_base.py +0 -0
  52. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/skl_tabular_classifier.py +0 -0
  53. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/skl_tabular_regression.py +0 -0
  54. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/statistical_base.py +0 -0
  55. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/survival_base.py +0 -0
  56. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_causal_language_modeler.py +0 -0
  57. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_embeddings.py +0 -0
  58. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_image_classifier.py +0 -0
  59. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_key_point_detector.py +0 -0
  60. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_masked_language_modeler.py +0 -0
  61. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_nlp_base.py +0 -0
  62. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_object_detector.py +0 -0
  63. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_semantic_segmentation.py +0 -0
  64. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_sentence_pair_classifier.py +0 -0
  65. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_seq2seq_modeler.py +0 -0
  66. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_tabular_classifier.py +0 -0
  67. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_tabular_regression.py +0 -0
  68. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_text_classifier.py +0 -0
  69. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_time_series_classifier.py +0 -0
  70. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_time_series_forecaster.py +0 -0
  71. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_time_to_event.py +0 -0
  72. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/torch_token_classifier.py +0 -0
  73. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/upload/weight_loaders.py +0 -0
  74. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/user.py +0 -0
  75. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/__init__.py +0 -0
  76. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/custom_loss_probe.py +0 -0
  77. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/detection_utils.py +0 -0
  78. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/feature_dict.py +0 -0
  79. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/general_utils.py +0 -0
  80. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/key_point_detection_utils.py +0 -0
  81. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/registry.py +0 -0
  82. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/safetensors_io.py +0 -0
  83. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/semantic_segmentation_utils.py +0 -0
  84. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/tabular_classification_utils.py +0 -0
  85. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/tabular_custom_loss_utils.py +0 -0
  86. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/tabular_regression_utils.py +0 -0
  87. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/text_classification_utils.py +0 -0
  88. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/time_series_utils.py +0 -0
  89. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/utils/time_to_event_utils.py +0 -0
  90. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/__init__.py +0 -0
  91. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/checker.py +0 -0
  92. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/lifelines_checks.py +0 -0
  93. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/pytorch_checks.py +0 -0
  94. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/rewriter.py +0 -0
  95. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/scikit_survival_checks.py +0 -0
  96. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc/validation/sklearn_checks.py +0 -0
  97. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc.egg-info/SOURCES.txt +0 -0
  98. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc.egg-info/dependency_links.txt +0 -0
  99. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc.egg-info/requires.txt +0 -0
  100. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc.egg-info/top_level.txt +0 -0
  101. {tracebloc-1.2.44 → tracebloc-1.2.45}/tracebloc_package/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracebloc
3
- Version: 1.2.44
3
+ Version: 1.2.45
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 = "1.2.44"
7
+ version = "1.2.45"
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"]
@@ -38,6 +38,7 @@ from .validation.lifelines_checks import (
38
38
  non_averageable_lifelines_estimator_reason,
39
39
  )
40
40
  from tracebloc.utils.constants import (
41
+ CLASSLESS_CATEGORIES,
41
42
  SKLEARN_FRAMEWORK,
42
43
  SCIKIT_SURVIVAL_FRAMEWORK,
43
44
  LIFELINES_FRAMEWORK,
@@ -48,10 +49,6 @@ from tracebloc.utils.constants import (
48
49
  TABULAR_CLASSIFICATION,
49
50
  TABULAR_REGRESSION,
50
51
  KEYPOINT_DETECTION,
51
- MASKED_LANGUAGE_MODELING,
52
- CAUSAL_LANGUAGE_MODELING,
53
- SEQ2SEQ,
54
- EMBEDDINGS,
55
52
  TIME_SERIES_FORECASTING,
56
53
  TIME_SERIES_CLASSIFICATION,
57
54
  )
@@ -220,14 +217,7 @@ def _render_mismatch_diagnostics(
220
217
  ``print``'s implicit newline).
221
218
  """
222
219
  expected_msg = ""
223
- if category not in [
224
- TABULAR_REGRESSION,
225
- TIME_SERIES_FORECASTING,
226
- MASKED_LANGUAGE_MODELING,
227
- CAUSAL_LANGUAGE_MODELING,
228
- SEQ2SEQ,
229
- EMBEDDINGS,
230
- ]:
220
+ if category not in CLASSLESS_CATEGORIES:
231
221
  expected_msg += f" output_classes : {content.get('datasetClasses')}\n"
232
222
  if "datasetShape" in content:
233
223
  expected_msg += f" shape : {content['datasetShape']}\n"
@@ -254,14 +244,7 @@ def _render_mismatch_diagnostics(
254
244
  expected_msg = f" {content}\n"
255
245
 
256
246
  model_msg = ""
257
- if category not in [
258
- TABULAR_REGRESSION,
259
- TIME_SERIES_FORECASTING,
260
- MASKED_LANGUAGE_MODELING,
261
- CAUSAL_LANGUAGE_MODELING,
262
- SEQ2SEQ,
263
- EMBEDDINGS,
264
- ]:
247
+ if category not in CLASSLESS_CATEGORIES:
265
248
  model_msg += f" output_classes : {content.get('outputClass')}\n"
266
249
  if "inputShape" in content:
267
250
  model_msg += f" shape : {content['inputShape']}\n"
@@ -366,14 +349,7 @@ def _apply_link_success(
366
349
  f"datasetId: {dataset_id}\n",
367
350
  f"totalDatasetSize: {total_dataset_size}\n",
368
351
  ]
369
- if category not in [
370
- TABULAR_REGRESSION,
371
- TIME_SERIES_FORECASTING,
372
- MASKED_LANGUAGE_MODELING,
373
- CAUSAL_LANGUAGE_MODELING,
374
- SEQ2SEQ,
375
- EMBEDDINGS,
376
- ]:
352
+ if category not in CLASSLESS_CATEGORIES:
377
353
  dataset_params.append(f"allClasses: {class_names}\n")
378
354
  print(*dataset_params)
379
355
 
@@ -25,6 +25,7 @@ from tracebloc.training.shape import (
25
25
  )
26
26
  from tracebloc.training.submitter import _FacadeCoordinator
27
27
  from tracebloc.utils.constants import (
28
+ CLASSLESS_CATEGORIES,
28
29
  TABULAR_CLASSIFICATION,
29
30
  TIME_SERIES_FORECASTING,
30
31
  TIME_SERIES_CLASSIFICATION,
@@ -102,6 +103,17 @@ class TrainingSummary(_FacadeCoordinator):
102
103
  if self._is_image_category()
103
104
  else []
104
105
  )
106
+ # Regression and generative categories have no classes, so the
107
+ # class lines would print a meaningless value (#796).
108
+ has_classes = self._f.category not in CLASSLESS_CATEGORIES
109
+ all_classes_line = (
110
+ [f"allClasses: {self._f.class_names}\n\n"] if has_classes else []
111
+ )
112
+ training_classes_line = (
113
+ [f"trainingClasses: {self._f.training_classes}\n"]
114
+ if has_classes
115
+ else []
116
+ )
105
117
  print(
106
118
  f" \033[1mTraining Description\033[0m\n\n",
107
119
  f"experimentName: {self._f.plan._name}\n",
@@ -110,9 +122,9 @@ class TrainingSummary(_FacadeCoordinator):
110
122
  f"\n \033[1mDataset Parameters\033[0m\n\n",
111
123
  f"datasetId: {self._f.dataset_id}\n",
112
124
  f"totalDatasetSize: {self._f.total_dataset_size}\n",
113
- f"allClasses: {self._f.class_names}\n\n",
125
+ *all_classes_line,
114
126
  f"trainingDatasetSize: {self._f.training_dataset_size}\n",
115
- f"trainingClasses: {self._f.training_classes}\n",
127
+ *training_classes_line,
116
128
  f"{shape_label}: {shape_value}\n",
117
129
  *data_type_line,
118
130
  f"seed: {self._f.plan._seed}\n",
@@ -70,6 +70,7 @@ from tracebloc.utils.constants import (
70
70
  PRETRAINED_WEIGHTS_FILENAME,
71
71
  TRAINED_WEIGHTS_FILENAME,
72
72
  AVERAGED_WEIGHTS_PATH,
73
+ missing_loss_message,
73
74
  )
74
75
 
75
76
  # Timeout for the /check-model/ upload call. The server runs a
@@ -840,9 +841,7 @@ class Model:
840
841
  if custom_loss or (category == OBJECT_DETECTION and model_type == YOLO):
841
842
  loss_file_path = os.path.join(self.tmp_dir_path, "loss.py")
842
843
  if not os.path.exists(loss_file_path):
843
- raise FileNotFoundError(
844
- "loss.py file missing in the zip.\nPlease refer to the documentation for more information."
845
- )
844
+ raise FileNotFoundError(missing_loss_message(category, model_type))
846
845
 
847
846
  # Load loss.py FRESH by explicit file path every call. Using the
848
847
  # global ``loss`` module name (``from loss import Custom_loss``)
@@ -106,6 +106,21 @@ EMBEDDINGS = TaskCategory.EMBEDDINGS
106
106
  TOKEN_CLASSIFICATION = TaskCategory.TOKEN_CLASSIFICATION
107
107
  SENTENCE_PAIR_CLASSIFICATION = TaskCategory.SENTENCE_PAIR_CLASSIFICATION
108
108
 
109
+ # Categories whose datasets carry no classes: regression targets
110
+ # (tabular regression, time-series forecasting) and the generative /
111
+ # representation text tasks. Every surface that prints a dataset's
112
+ # classes (``allClasses`` / ``trainingClasses`` / ``output_classes``)
113
+ # leaves them out for these. A tuple, not a set: ``in`` then compares by
114
+ # equality, so a plain category string matches its enum member.
115
+ CLASSLESS_CATEGORIES = (
116
+ TABULAR_REGRESSION,
117
+ TIME_SERIES_FORECASTING,
118
+ MASKED_LANGUAGE_MODELING,
119
+ CAUSAL_LANGUAGE_MODELING,
120
+ SEQ2SEQ,
121
+ EMBEDDINGS,
122
+ )
123
+
109
124
 
110
125
  # Platform-canonical time-series defaults.
111
126
  # The backend Experiment model is the single source of truth for a no-touch
@@ -190,3 +205,28 @@ SUCCESS = "success"
190
205
  TORCH_HUB_PATTERN = "torch.hub"
191
206
  DNN = "fcn"
192
207
  ML = "ml"
208
+
209
+
210
+ def missing_loss_message(category=None, model_type=None) -> str:
211
+ """The error ``configure_loss`` raises when the upload carries no ``loss.py``.
212
+
213
+ A YOLO object detector always trains with its own ``loss.py``, so the
214
+ model zoo ships each YOLO template as a folder (``model.py`` + ``loss.py``)
215
+ next to a ready-to-upload flat zip of it. Uploading the folder's
216
+ ``model.py`` alone lands here, so the YOLO message names the zip.
217
+ """
218
+ if category == OBJECT_DETECTION and model_type == YOLO:
219
+ return (
220
+ "loss.py file missing in the zip. A YOLO model trains with its "
221
+ "own loss.py, so upload model.py and loss.py together as one zip.\n"
222
+ "For a model zoo YOLO template, upload the ready-made zip next to "
223
+ "its folder, e.g. model_zoo/object_detection/pytorch/yolo_v8.zip "
224
+ "instead of yolo_v8/model.py.\n"
225
+ "For your own YOLO model, zip model.py and loss.py flat (both at "
226
+ "the root of the zip, no folder inside) and upload the .zip.\n"
227
+ "Please refer to the documentation for more information."
228
+ )
229
+ return (
230
+ "loss.py file missing in the zip.\n"
231
+ "Please refer to the documentation for more information."
232
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracebloc
3
- Version: 1.2.44
3
+ Version: 1.2.45
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