tracebloc 1.2.63__tar.gz → 1.2.64__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 (116) hide show
  1. {tracebloc-1.2.63 → tracebloc-1.2.64}/PKG-INFO +1 -1
  2. {tracebloc-1.2.63 → tracebloc-1.2.64}/pyproject.toml +1 -1
  3. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_linking.py +8 -22
  4. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/plan.py +24 -20
  5. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/summary.py +3 -3
  6. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/user.py +1 -2
  7. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc.egg-info/PKG-INFO +1 -1
  8. {tracebloc-1.2.63 → tracebloc-1.2.64}/MANIFEST.in +0 -0
  9. {tracebloc-1.2.63 → tracebloc-1.2.64}/README.md +0 -0
  10. {tracebloc-1.2.63 → tracebloc-1.2.64}/license.txt +0 -0
  11. {tracebloc-1.2.63 → tracebloc-1.2.64}/setup.cfg +0 -0
  12. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/__init__.py +0 -0
  13. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_deprecation.py +0 -0
  14. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_framework_utils.py +0 -0
  15. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_http_utils.py +0 -0
  16. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_link_answer.py +0 -0
  17. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_raw_width_note.py +0 -0
  18. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/_stored_link.py +0 -0
  19. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/checks.py +0 -0
  20. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/client.py +0 -0
  21. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/config.py +0 -0
  22. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/contracts/stage_urls.v1.json +0 -0
  23. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/contracts/stage_urls.v1.source.json +0 -0
  24. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/contracts/survival_payload.py +0 -0
  25. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/env_login.py +0 -0
  26. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/exceptions.py +0 -0
  27. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/fetch.py +0 -0
  28. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/inference.py +0 -0
  29. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/lifelines_weights.py +0 -0
  30. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/link_model_dataset.py +0 -0
  31. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/__init__.py +0 -0
  32. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/_partials.tpl +0 -0
  33. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/embeddings.tpl +0 -0
  34. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/nlp_finetune.tpl +0 -0
  35. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/nlp_generative.tpl +0 -0
  36. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/survival.tpl +0 -0
  37. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/tabular_timeseries.tpl +0 -0
  38. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/notebook/templates/vision_from_scratch.tpl +0 -0
  39. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/raw_mode.py +0 -0
  40. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/raw_mode_frame.py +0 -0
  41. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/raw_mode_seed.py +0 -0
  42. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/raw_mode_survival.py +0 -0
  43. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/raw_mode_torch.py +0 -0
  44. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/seed_weights.py +0 -0
  45. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/__init__.py +0 -0
  46. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/augmentation.py +0 -0
  47. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/callbacks.py +0 -0
  48. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/features.py +0 -0
  49. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/image_size.py +0 -0
  50. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/lora.py +0 -0
  51. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/lora_validation.py +0 -0
  52. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/loss.py +0 -0
  53. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/memory_estimate.py +0 -0
  54. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/preprocessing.py +0 -0
  55. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/shape.py +0 -0
  56. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/subdataset.py +0 -0
  57. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/training/submitter.py +0 -0
  58. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/__init__.py +0 -0
  59. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/lifelines_time_to_event.py +0 -0
  60. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/model_upload.py +0 -0
  61. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/scikit_survival_time_to_event.py +0 -0
  62. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/skl_tabular_base.py +0 -0
  63. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/skl_tabular_classifier.py +0 -0
  64. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/skl_tabular_regression.py +0 -0
  65. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/statistical_base.py +0 -0
  66. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/survival_base.py +0 -0
  67. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_causal_language_modeler.py +0 -0
  68. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_embeddings.py +0 -0
  69. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_image_classifier.py +0 -0
  70. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_key_point_detector.py +0 -0
  71. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_masked_language_modeler.py +0 -0
  72. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_nlp_base.py +0 -0
  73. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_object_detector.py +0 -0
  74. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_semantic_segmentation.py +0 -0
  75. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_sentence_pair_classifier.py +0 -0
  76. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_seq2seq_modeler.py +0 -0
  77. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_tabular_classifier.py +0 -0
  78. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_tabular_regression.py +0 -0
  79. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_text_classifier.py +0 -0
  80. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_time_series_classifier.py +0 -0
  81. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_time_series_forecaster.py +0 -0
  82. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_time_to_event.py +0 -0
  83. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/torch_token_classifier.py +0 -0
  84. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/upload/weight_loaders.py +0 -0
  85. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/__init__.py +0 -0
  86. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/class_order.py +0 -0
  87. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/constants.py +0 -0
  88. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/custom_loss_probe.py +0 -0
  89. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/detection_utils.py +0 -0
  90. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/entry_point.py +0 -0
  91. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/feature_dict.py +0 -0
  92. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/general_utils.py +0 -0
  93. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/key_point_detection_utils.py +0 -0
  94. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/registry.py +0 -0
  95. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/safetensors_io.py +0 -0
  96. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/semantic_segmentation_utils.py +0 -0
  97. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/tabular_classification_utils.py +0 -0
  98. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/tabular_custom_loss_utils.py +0 -0
  99. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/tabular_regression_utils.py +0 -0
  100. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/text_classification_utils.py +0 -0
  101. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/time_series_utils.py +0 -0
  102. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/time_to_event_utils.py +0 -0
  103. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/utils/warnings_once.py +0 -0
  104. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/__init__.py +0 -0
  105. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/checker.py +0 -0
  106. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/header_rules.py +0 -0
  107. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/lifelines_checks.py +0 -0
  108. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/pytorch_checks.py +0 -0
  109. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/rewriter.py +0 -0
  110. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/scikit_survival_checks.py +0 -0
  111. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc/validation/sklearn_checks.py +0 -0
  112. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc.egg-info/SOURCES.txt +0 -0
  113. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc.egg-info/dependency_links.txt +0 -0
  114. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc.egg-info/requires.txt +0 -0
  115. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc.egg-info/top_level.txt +0 -0
  116. {tracebloc-1.2.63 → tracebloc-1.2.64}/tracebloc_package/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracebloc
3
- Version: 1.2.63
3
+ Version: 1.2.64
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.63"
7
+ version = "1.2.64"
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"]
@@ -51,7 +51,6 @@ from .validation.lifelines_checks import (
51
51
  )
52
52
  from .validation.header_rules import NO_OUTPUT_CLASSES
53
53
  from tracebloc.utils.constants import (
54
- CLASSLESS_CATEGORIES,
55
54
  SKLEARN_FRAMEWORK,
56
55
  SCIKIT_SURVIVAL_FRAMEWORK,
57
56
  LIFELINES_FRAMEWORK,
@@ -321,10 +320,9 @@ def _apply_link_success(
321
320
  ):
322
321
  """Handle a passed check-model response.
323
322
 
324
- Prints the success output (byte-identical to the pre-split inline
325
- prints), runs the link-time hard-fail checks and the warn-only soft
326
- checks, and returns a :class:`LinkSuccessState` with the dataset
327
- parameters for the caller to apply. Raises
323
+ Prints the success output, runs the link-time hard-fail checks and the
324
+ warn-only soft checks, and returns a :class:`LinkSuccessState` with the
325
+ dataset parameters for the caller to apply. Raises
328
326
  :class:`DatasetLinkingError` when a hard-fail check trips.
329
327
  """
330
328
  total_images = content["total_images"]
@@ -372,23 +370,10 @@ def _apply_link_success(
372
370
 
373
371
  text = colored("Assignment successful!", "green")
374
372
  print(text, "\n")
375
- dataset_params = [
376
- f"\n \033[1mDataset Parameters\033[0m\n\n",
377
- f"datasetId: {dataset_id}\n",
378
- f"totalDatasetSize: {total_dataset_size}\n",
379
- ]
380
- # The published order the head must follow (backend#5686): ``allClasses``
381
- # is a count per class in no index order, so it is only the fallback for a
382
- # platform that sends no ``class_order``.
383
- class_order = content.get("class_order")
384
- order_text = class_order_text(class_order)
385
- if order_text is not None:
386
- dataset_params.append(f"{order_text}\n")
387
- elif category not in CLASSLESS_CATEGORIES:
388
- dataset_params.append(f"allClasses: {class_names}\n")
373
+ # The dataset parameters print once, in the training plan
374
+ # (``TrainingSummary.get_training_plan``), which ``start()`` prints too.
389
375
  if input_contract: # raw mode's checked input contract (backend#5679)
390
- dataset_params.append(f"{input_contract}\n")
391
- print(*dataset_params)
376
+ print(f"{input_contract}\n")
392
377
 
393
378
  # Hard-fail: for token classification the dataset's label values
394
379
  # are BIO tag sequences; the model head must match the count of
@@ -484,6 +469,7 @@ def _apply_link_success(
484
469
 
485
470
  print("Please set a training plan.")
486
471
  resources = content.get("resources")
472
+ class_order = content.get("class_order")
487
473
  return LinkSuccessState(
488
474
  total_images=total_images,
489
475
  num_classes=num_classes,
@@ -493,5 +479,5 @@ def _apply_link_success(
493
479
  table_name=table_name,
494
480
  resources=resources if isinstance(resources, dict) else None,
495
481
  image_attributes=image_attributes,
496
- class_order=class_order if order_text is not None else None,
482
+ class_order=class_order if class_order_text(class_order) is not None else None,
497
483
  )
@@ -106,17 +106,29 @@ MAX_CYCLES = 100
106
106
  MAX_NAME_LENGTH = 200
107
107
 
108
108
 
109
- def _print_not_supported(
110
- parameter: str, framework: str, message: bool = False
111
- ) -> None:
109
+ def _print_not_supported(parameter: str, framework: str) -> None:
112
110
  """Print the "parameter not supported on framework" banner in red."""
113
- if message:
114
- text = parameter
115
- else:
116
- text = f"The parameter {parameter} is not supported on {framework}\n"
111
+ text = f"The parameter {parameter} is not supported on {framework}\n"
117
112
  print(colored(text, "red"), "\n")
118
113
 
119
114
 
115
+ def _print_one_pass(parameter: str, asked: Any, framework: str) -> None:
116
+ """Say that a one-pass framework keeps ``parameter`` at 1, unless 1 is what
117
+ was asked: one fit is one pass, and the model's own iteration setting
118
+ lengthens it."""
119
+ if type(asked) is int and asked == 1:
120
+ return
121
+ print(
122
+ colored(
123
+ f"A {framework} model trains in one pass, so {parameter} stays 1. "
124
+ "To train longer, raise the model's own iteration setting, "
125
+ "such as max_iter.",
126
+ "yellow",
127
+ ),
128
+ "\n",
129
+ )
130
+
131
+
120
132
  class TrainingPlan:
121
133
  """Plan-parameter state + validators for :class:`LinkModelDataset`.
122
134
 
@@ -147,9 +159,9 @@ class TrainingPlan:
147
159
  self._on_invalid = on_invalid
148
160
 
149
161
  # Plan state. Survival frameworks (sklearn, lifelines, scikit-survival)
150
- # train in a single pass — epochs and cycles are both forced to 1;
151
- # the `epochs()` / `cycles()` setters below reject any attempt to
152
- # override. Non-survival frameworks default to the historical
162
+ # train in a single pass — epochs and cycles are both forced to 1,
163
+ # and the `epochs()` / `cycles()` setters below keep them there
164
+ # (`_print_one_pass`). Non-survival frameworks default to the historical
153
165
  # epochs=10, cycles=1 and can be tuned freely.
154
166
  is_survival = framework in _SURVIVAL_FRAMEWORKS
155
167
  self._epochs: int = 1 if is_survival else 10
@@ -196,11 +208,7 @@ class TrainingPlan:
196
208
 
197
209
  def epochs(self, epochs: int) -> None:
198
210
  if self._framework in _SURVIVAL_FRAMEWORKS:
199
- _print_not_supported(
200
- f"For {self._framework} framework epochs cannot be updated. Epoch is set to 1",
201
- self._framework,
202
- message=True,
203
- )
211
+ _print_one_pass("epochs", epochs, self._framework)
204
212
  self._epochs = 1
205
213
  self._on_valid()
206
214
  elif type(epochs) == int and 0 < epochs <= MAX_EPOCHS:
@@ -214,11 +222,7 @@ class TrainingPlan:
214
222
 
215
223
  def cycles(self, cycles: int) -> None:
216
224
  if self._framework in _SURVIVAL_FRAMEWORKS:
217
- _print_not_supported(
218
- f"For {self._framework} framework cycles cannot be updated. Cycle is set to 1",
219
- self._framework,
220
- message=True,
221
- )
225
+ _print_one_pass("cycles", cycles, self._framework)
222
226
  self._cycles = 1
223
227
  self._on_valid()
224
228
  elif type(cycles) == int:
@@ -107,9 +107,9 @@ class TrainingSummary(_FacadeCoordinator):
107
107
  # Regression and generative categories have no classes, so the
108
108
  # class lines would print a meaningless value (#796).
109
109
  has_classes = self._f.category not in CLASSLESS_CATEGORIES
110
- # The published order the head must follow, the same block the
111
- # link prints (backend#5686); ``allClasses`` (a count per class in
112
- # no index order) only when the platform sent no order.
110
+ # The published order the head must follow (backend#5686);
111
+ # ``allClasses`` (a count per class in no index order) only when
112
+ # the platform sent no order.
113
113
  order_text = class_order_text(self._f.class_order)
114
114
  if order_text is not None:
115
115
  all_classes_line = [f"{order_text}\n\n"]
@@ -42,7 +42,6 @@ from .utils.general_utils import (
42
42
  format_exception,
43
43
  get_paths,
44
44
  require_login,
45
- print_error,
46
45
  remove_tmp_file,
47
46
  scope_weights_path_to_framework,
48
47
  )
@@ -613,7 +612,7 @@ class User:
613
612
  )
614
613
 
615
614
  if upload:
616
- print_error(text=f"\n'{self.__model_name}' upload successful.\n")
615
+ print(colored(f"\n'{self.__model_name}' upload successful.\n", "green"), "\n")
617
616
  warn_if_seed_skipped(self.__client, self.__model_file_path, self.__weights)
618
617
  remove_tmp_file(tmp_dir_path=self.__general_checks_obj.tmp_file_path)
619
618
  finally:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tracebloc
3
- Version: 1.2.63
3
+ Version: 1.2.64
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