tracebloc 1.2.92__tar.gz → 2.0.0__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.
- {tracebloc-1.2.92 → tracebloc-2.0.0}/PKG-INFO +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/pyproject.toml +8 -8
- tracebloc-2.0.0/tracebloc/_deprecation.py +14 -0
- tracebloc-2.0.0/tracebloc/_framework_utils.py +26 -0
- tracebloc-2.0.0/tracebloc/_http_utils.py +12 -0
- tracebloc-2.0.0/tracebloc/_link_answer.py +8 -0
- tracebloc-2.0.0/tracebloc/_link_regeneration.py +25 -0
- tracebloc-2.0.0/tracebloc/_linking.py +15 -0
- tracebloc-2.0.0/tracebloc/_raw_width_note.py +12 -0
- tracebloc-2.0.0/tracebloc/_stored_link.py +21 -0
- tracebloc-2.0.0/tracebloc/_upload_conversion.py +17 -0
- tracebloc-2.0.0/tracebloc/api/__init__.py +6 -0
- tracebloc-2.0.0/tracebloc/api/experiment_status.py +40 -0
- tracebloc-2.0.0/tracebloc/auth/__init__.py +5 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/checks.py +4 -3
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/client.py +4 -3
- tracebloc-2.0.0/tracebloc/compat/__init__.py +6 -0
- tracebloc-1.2.92/tracebloc/_deprecation.py → tracebloc-2.0.0/tracebloc/compat/deprecation.py +1 -1
- tracebloc-1.2.92/tracebloc/_framework_utils.py → tracebloc-2.0.0/tracebloc/compat/frameworks.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/acceptance.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/hf/__init__.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/hf/_model_type.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/tabular.py +2 -2
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/gate.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/outputs.py +2 -2
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/checkpoint.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/package.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/tokenizers.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/training_versions.py +2 -2
- {tracebloc-1.2.92/tracebloc → tracebloc-2.0.0/tracebloc/downloads}/lifelines_weights.py +1 -1
- {tracebloc-1.2.92/tracebloc → tracebloc-2.0.0/tracebloc/downloads}/seed_weights.py +4 -4
- tracebloc-2.0.0/tracebloc/env_login.py +18 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/exceptions.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/fetch.py +2 -2
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/inference.py +4 -6
- tracebloc-2.0.0/tracebloc/library_fetch.py +11 -0
- tracebloc-2.0.0/tracebloc/lifelines_weights.py +16 -0
- tracebloc-2.0.0/tracebloc/link_model_dataset.py +17 -0
- tracebloc-2.0.0/tracebloc/linking/__init__.py +14 -0
- tracebloc-2.0.0/tracebloc/linking/augmentation_methods.py +179 -0
- tracebloc-2.0.0/tracebloc/linking/check_model.py +72 -0
- tracebloc-1.2.92/tracebloc/_upload_conversion.py → tracebloc-2.0.0/tracebloc/linking/conversion.py +1 -1
- tracebloc-2.0.0/tracebloc/linking/data_methods.py +340 -0
- tracebloc-1.2.92/tracebloc/library_fetch.py → tracebloc-2.0.0/tracebloc/linking/library.py +1 -1
- tracebloc-2.0.0/tracebloc/linking/model_dataset.py +464 -0
- tracebloc-1.2.92/tracebloc/_linking.py → tracebloc-2.0.0/tracebloc/linking/response.py +15 -16
- tracebloc-1.2.92/tracebloc/_stored_link.py → tracebloc-2.0.0/tracebloc/linking/stored.py +2 -2
- tracebloc-2.0.0/tracebloc/linking/training_methods.py +365 -0
- tracebloc-2.0.0/tracebloc/linking/user_methods.py +275 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/__init__.py +2 -2
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/declaration.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/fitted_model.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/schema.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/torch_checks.py +1 -1
- tracebloc-2.0.0/tracebloc/seed_weights.py +24 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/augmentation.py +43 -43
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/callbacks.py +14 -14
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/features.py +24 -24
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/image_channels.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/lora.py +4 -4
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/lora_validation.py +8 -8
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/loss.py +24 -27
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/plan.py +42 -44
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/preprocessing.py +22 -22
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/shape.py +19 -19
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/submitter.py +15 -14
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/summary.py +2 -3
- tracebloc-2.0.0/tracebloc/upload/loss_config.py +131 -0
- tracebloc-2.0.0/tracebloc/upload/model_params.py +213 -0
- tracebloc-2.0.0/tracebloc/upload/model_upload.py +398 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/nlp_probes.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/skl_tabular_base.py +3 -5
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/skl_tabular_classifier.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/skl_tabular_regression.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/survival_base.py +3 -5
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_embeddings.py +2 -4
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_image_classifier.py +4 -8
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_key_point_detector.py +6 -6
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_nlp_base.py +5 -5
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_object_detector.py +4 -4
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_semantic_segmentation.py +4 -7
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_seq2seq_modeler.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_tabular_classifier.py +3 -5
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_tabular_regression.py +3 -5
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_text_classifier.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_time_series_classifier.py +3 -6
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_time_series_forecaster.py +3 -6
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_time_to_event.py +3 -5
- tracebloc-2.0.0/tracebloc/upload/user_methods.py +366 -0
- tracebloc-2.0.0/tracebloc/upload/weights_averaging.py +210 -0
- tracebloc-2.0.0/tracebloc/upload/weights_check.py +271 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/weights_parts.py +2 -2
- tracebloc-2.0.0/tracebloc/user.py +399 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/data_probes.py +4 -11
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/registry.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/safetensors_io.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/text_classification_utils.py +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/checker.py +4 -6
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/pytorch_checks.py +3 -5
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc.egg-info/PKG-INFO +1 -1
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc.egg-info/SOURCES.txt +30 -2
- tracebloc-2.0.0/tracebloc.egg-info/top_level.txt +1 -0
- tracebloc-1.2.92/tracebloc/link_model_dataset.py +0 -1194
- tracebloc-1.2.92/tracebloc/upload/model_upload.py +0 -927
- tracebloc-1.2.92/tracebloc/user.py +0 -1069
- tracebloc-1.2.92/tracebloc.egg-info/top_level.txt +0 -2
- tracebloc-1.2.92/tracebloc_package/__init__.py +0 -53
- {tracebloc-1.2.92 → tracebloc-2.0.0}/MANIFEST.in +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/README.md +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/license.txt +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/setup.cfg +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/__init__.py +0 -0
- /tracebloc-1.2.92/tracebloc/_http_utils.py → /tracebloc-2.0.0/tracebloc/api/responses.py +0 -0
- {tracebloc-1.2.92/tracebloc → tracebloc-2.0.0/tracebloc/auth}/env_login.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/config.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/contracts/stage_urls.v1.json +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/contracts/stage_urls.v1.source.json +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/contracts/survival_payload.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/contracts/training_requirements.source.json +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/contracts/training_requirements.txt +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/hf/_build.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/vision/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/families/vision/_matching.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/heads.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/interfaces.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/licence/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/licence/spdx.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/arguments.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/assemble.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/gate_rules.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/generate.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/head.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/import_check.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/layer0.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/live.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/model_class.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/remote.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/repo.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/shake.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/owncode/source_tree.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/padding.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/convert/report.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/base.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/detection.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/keypoint_detection.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/semantic_segmentation.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/tabular.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/text.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/time_series.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/datasets/time_to_event.py +0 -0
- /tracebloc-1.2.92/tracebloc/_link_answer.py → /tracebloc-2.0.0/tracebloc/linking/answer.py +0 -0
- /tracebloc-1.2.92/tracebloc/_link_regeneration.py → /tracebloc-2.0.0/tracebloc/linking/regeneration.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/_partials.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/embeddings.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/nlp_finetune.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/nlp_generative.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/survival.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/tabular_timeseries.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/notebook/templates/vision_from_scratch.tpl +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/classes.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/frame_recording.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/link_check.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/pairs.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/seed_prefixes.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/sklearn_check.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode/survival.py +0 -0
- /tracebloc-1.2.92/tracebloc/_raw_width_note.py → /tracebloc-2.0.0/tracebloc/raw_mode/width_note.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode_frame.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode_seed.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode_survival.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/raw_mode_torch.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/converted.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/image_size.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/link_total.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/loss_policy.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/loss_source.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/memory_estimate.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/training/subdataset.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/lifelines_time_to_event.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/scikit_survival_time_to_event.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/sequence_length.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/statistical_base.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_causal_language_modeler.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_handler.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_masked_language_modeler.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_multi_label_text_classifier.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_sentence_pair_classifier.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_text_regressor.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/torch_token_classifier.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/upload/weight_loaders.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/class_order.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/constants.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/custom_loss_probe.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/declared_classes.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/declared_cls.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/detection_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/device.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/entry_point.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/errors.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/feature_dict.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/general_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/key_point_detection_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/model_loading.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/model_params.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/resources.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/semantic_segmentation_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/tabular_classification_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/tabular_custom_loss_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/tabular_regression_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/time_series_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/time_to_event_utils.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/utils/warnings_once.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/__init__.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/estimator_checks.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/header_rules.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/lifelines_checks.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/rewriter.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/scikit_survival_checks.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc/validation/sklearn_checks.py +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc.egg-info/dependency_links.txt +0 -0
- {tracebloc-1.2.92 → tracebloc-2.0.0}/tracebloc.egg-info/requires.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tracebloc"
|
|
7
|
-
version = "
|
|
7
|
+
version = "2.0.0"
|
|
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"]
|
|
@@ -98,7 +98,7 @@ xgboost = [
|
|
|
98
98
|
]
|
|
99
99
|
lifelines = [
|
|
100
100
|
"lifelines>=0.30.3",
|
|
101
|
-
# tracebloc.lifelines_weights reads a multi-edge run's downloaded
|
|
101
|
+
# tracebloc.downloads.lifelines_weights reads a multi-edge run's downloaded
|
|
102
102
|
# coefficients file, a SafeTensors container. Same floor as [pytorch].
|
|
103
103
|
"safetensors>=0.4.3",
|
|
104
104
|
]
|
|
@@ -173,16 +173,16 @@ dev = [
|
|
|
173
173
|
[project.urls]
|
|
174
174
|
Homepage = "https://tracebloc.io"
|
|
175
175
|
|
|
176
|
-
# An allowlist of the import packages the wheel ships: the SDK and
|
|
177
|
-
# pre-0.8.0 `tracebloc_package` shim
|
|
178
|
-
#
|
|
176
|
+
# An allowlist of the import packages the wheel ships: the SDK, and only
|
|
177
|
+
# the SDK (the pre-0.8.0 `tracebloc_package` shim was removed in 2.0.0).
|
|
178
|
+
# pyproject discovery runs in namespace mode, so every directory
|
|
179
179
|
# counts as a package whether or not it has an `__init__.py`; with no
|
|
180
180
|
# `include` it shipped the repo's `tests/` and `scripts/` into site-packages
|
|
181
181
|
# as top-level `tests` and `scripts` packages. A new public top-level package
|
|
182
182
|
# has to be added here, and tests/test_wheel_packages.py holds the list.
|
|
183
183
|
[tool.setuptools.packages.find]
|
|
184
184
|
where = ["."]
|
|
185
|
-
include = ["tracebloc", "tracebloc.*"
|
|
185
|
+
include = ["tracebloc", "tracebloc.*"]
|
|
186
186
|
|
|
187
187
|
# The backend's stage -> API URL contract (and its pin), which
|
|
188
188
|
# tracebloc.config reads at import: a wheel or sdist without it cannot
|
|
@@ -233,11 +233,11 @@ ignore = ["N812"]
|
|
|
233
233
|
[tool.ruff.lint.per-file-ignores]
|
|
234
234
|
# Deprecation helpers: lowercase class name is intentional (decorator-like
|
|
235
235
|
# descriptor), and module-level __getattr__/__dir__ are PEP 562 dunders.
|
|
236
|
-
"tracebloc/
|
|
236
|
+
"tracebloc/compat/deprecation.py" = ["N801", "N807"]
|
|
237
237
|
|
|
238
238
|
# Deprecated camelCase class/method aliases are preserved until 1.0.0.
|
|
239
239
|
# SDK.2c (class) and SDK.2d (method) aliases land as class-scope mixedCase.
|
|
240
|
-
"tracebloc/
|
|
240
|
+
"tracebloc/linking/model_dataset.py" = ["N815"]
|
|
241
241
|
"tracebloc/user.py" = ["N815"]
|
|
242
242
|
|
|
243
243
|
# YOLO / vision math uses single-letter S, B, C, H, W variables per ML
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.compat.deprecation`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.compat.deprecation import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
deprecated_method_alias,
|
|
9
|
+
deprecated_aliases,
|
|
10
|
+
discard_removed_kwarg,
|
|
11
|
+
_Sentinel,
|
|
12
|
+
UNSET,
|
|
13
|
+
resolve_renamed_kwarg,
|
|
14
|
+
)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.compat.frameworks`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.compat.frameworks import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
_PYPI_EXTRAS_URL,
|
|
9
|
+
_DISTRIBUTION,
|
|
10
|
+
_META_EXTRAS,
|
|
11
|
+
_IMPORT_TO_DISTRIBUTION,
|
|
12
|
+
_EXTRA_MARKER,
|
|
13
|
+
_REQUIREMENT_NAME,
|
|
14
|
+
_normalize,
|
|
15
|
+
_declared_requirements,
|
|
16
|
+
build_module_extras,
|
|
17
|
+
_distribution_extras,
|
|
18
|
+
_ModuleExtras,
|
|
19
|
+
_MODULE_TO_EXTRA,
|
|
20
|
+
extra_for_module,
|
|
21
|
+
missing_extra_hint,
|
|
22
|
+
extras_for,
|
|
23
|
+
require_module,
|
|
24
|
+
_LOGICAL_TO_MODULE,
|
|
25
|
+
require_framework,
|
|
26
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.api.responses`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.api.responses import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
_extract_error_message,
|
|
9
|
+
LOAD_FAILED_PREFIX,
|
|
10
|
+
REUPLOAD_HINT,
|
|
11
|
+
is_load_failed,
|
|
12
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.1): moved to
|
|
2
|
+
:mod:`tracebloc.linking.answer`. Every name stays importable from this path
|
|
3
|
+
for existing callers; new code imports from the new module.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from tracebloc.linking.answer import ( # noqa: F401 (re-export, RFC-0348 C.1)
|
|
7
|
+
compared_keys,
|
|
8
|
+
)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.1): moved to
|
|
2
|
+
:mod:`tracebloc.linking.regeneration`. Every name stays importable from this path
|
|
3
|
+
for existing callers; new code imports from the new module.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from tracebloc.linking.regeneration import ( # noqa: F401 (re-export, RFC-0348 C.1)
|
|
7
|
+
_class_count,
|
|
8
|
+
_folded,
|
|
9
|
+
_head_keys,
|
|
10
|
+
_PLACEHOLDER_LABEL,
|
|
11
|
+
_positive_int,
|
|
12
|
+
_put_back,
|
|
13
|
+
_remove,
|
|
14
|
+
_restored_on_error,
|
|
15
|
+
_rewrite,
|
|
16
|
+
align_head,
|
|
17
|
+
ALIGNED_HEAD,
|
|
18
|
+
changed_counts,
|
|
19
|
+
dataset_counts,
|
|
20
|
+
HEAD_CLASS_ORDER,
|
|
21
|
+
HEAD_PREFIXES,
|
|
22
|
+
head_rows,
|
|
23
|
+
ID2LABEL,
|
|
24
|
+
regenerated_for_link,
|
|
25
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.1): moved to
|
|
2
|
+
:mod:`tracebloc.linking.response`. Every name stays importable from this path
|
|
3
|
+
for existing callers; new code imports from the new module.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from tracebloc.linking.response import ( # noqa: F401 (re-export, RFC-0348 C.1)
|
|
7
|
+
_apply_link_success,
|
|
8
|
+
_map_link_response,
|
|
9
|
+
_parse_api_message,
|
|
10
|
+
_render_mismatch_diagnostics,
|
|
11
|
+
_status_reason,
|
|
12
|
+
DATASET_KEY_HINT,
|
|
13
|
+
LinkSuccessState,
|
|
14
|
+
regenerated_for_link,
|
|
15
|
+
)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.raw_mode.width_note`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.raw_mode.width_note import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
ONE_HOT_EXPECTED,
|
|
9
|
+
_START_REFUSAL,
|
|
10
|
+
_note,
|
|
11
|
+
raw_width_note,
|
|
12
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.1): moved to
|
|
2
|
+
:mod:`tracebloc.linking.stored`. Every name stays importable from this path
|
|
3
|
+
for existing callers; new code imports from the new module.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from tracebloc.linking.stored import ( # noqa: F401 (re-export, RFC-0348 C.1)
|
|
7
|
+
_posix_stem,
|
|
8
|
+
check_weights_without_upload,
|
|
9
|
+
fetch_stored_model,
|
|
10
|
+
LIBRARY_MODEL_ID,
|
|
11
|
+
library_pick,
|
|
12
|
+
LIBRARY_REFUSAL_HINTS,
|
|
13
|
+
LIBRARY_VERSION,
|
|
14
|
+
raise_library_refusal,
|
|
15
|
+
stored_link_request,
|
|
16
|
+
STORED_MODEL,
|
|
17
|
+
STORED_MODEL_HINT,
|
|
18
|
+
stored_model_identity,
|
|
19
|
+
TEMPLATE,
|
|
20
|
+
WEIGHTS_FILE_ID,
|
|
21
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.1): moved to
|
|
2
|
+
:mod:`tracebloc.linking.conversion`. Every name stays importable from this path
|
|
3
|
+
for existing callers; new code imports from the new module.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from tracebloc.linking.conversion import ( # noqa: F401 (re-export, RFC-0348 C.1)
|
|
7
|
+
_category,
|
|
8
|
+
_json,
|
|
9
|
+
_not_found,
|
|
10
|
+
_todays_path,
|
|
11
|
+
ASK,
|
|
12
|
+
dataset_task,
|
|
13
|
+
DATASET_TASK_PATH,
|
|
14
|
+
for_upload,
|
|
15
|
+
refuse_unsendable,
|
|
16
|
+
UploadInput,
|
|
17
|
+
)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""Reading the platform's HTTP answers (RFC-0348 C.3).
|
|
2
|
+
|
|
3
|
+
``responses`` holds the error-message extraction and the load-failed check
|
|
4
|
+
that ``client``, ``fetch``, ``inference``, ``User`` and the upload and link
|
|
5
|
+
flows share. The old root module ``tracebloc.api.responses`` re-exports it.
|
|
6
|
+
"""
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""The experiment-status read behind ``User.get_experiment_status`` (RFC-0348 D.2).
|
|
2
|
+
|
|
3
|
+
Moved, unchanged, out of ``tracebloc/user.py``; the login check stays on
|
|
4
|
+
``User`` (it raises rather than returning ``None``).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import json
|
|
8
|
+
|
|
9
|
+
from tracebloc.api.responses import _extract_error_message
|
|
10
|
+
from tracebloc.exceptions import APIError
|
|
11
|
+
from tracebloc.utils.errors import format_exception
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def experiment_status(client, experiment_key):
|
|
15
|
+
"""A run's status dict, or ``None`` on a 404. See ``User.get_experiment_status``."""
|
|
16
|
+
response = client.get(f"experiment-status/{experiment_key}/", raise_on_error=False)
|
|
17
|
+
if response.status_code == 404:
|
|
18
|
+
return None
|
|
19
|
+
if not response.ok:
|
|
20
|
+
raise APIError(response.status_code, _extract_error_message(response))
|
|
21
|
+
try:
|
|
22
|
+
body = response.json()
|
|
23
|
+
return {
|
|
24
|
+
"experiment_key": body.get("experiment_key", experiment_key),
|
|
25
|
+
"status": body.get("status"),
|
|
26
|
+
"status_display": body.get("status_display"),
|
|
27
|
+
"category": body.get("category"),
|
|
28
|
+
"reason": body.get("reason"),
|
|
29
|
+
}
|
|
30
|
+
except (ValueError, TypeError, AttributeError, json.JSONDecodeError) as error:
|
|
31
|
+
# A 2xx with a malformed / non-dict body (bad JSON, or a list /
|
|
32
|
+
# null / scalar that has no ``.get``) would otherwise surface as
|
|
33
|
+
# JSONDecodeError / AttributeError — outside the documented SDK
|
|
34
|
+
# exception hierarchy. Normalize to APIError, matching
|
|
35
|
+
# TraceblocClient.login and _map_link_response.
|
|
36
|
+
raise APIError(
|
|
37
|
+
response.status_code,
|
|
38
|
+
f"Malformed experiment-status response body: "
|
|
39
|
+
f"{format_exception(error)}",
|
|
40
|
+
) from error
|
|
@@ -23,8 +23,9 @@ from __future__ import annotations
|
|
|
23
23
|
import re
|
|
24
24
|
import time
|
|
25
25
|
|
|
26
|
-
from tracebloc.
|
|
27
|
-
from tracebloc.utils.
|
|
26
|
+
from tracebloc.raw_mode.frame_recording import raw_upload_failure
|
|
27
|
+
from tracebloc.utils.errors import format_exception
|
|
28
|
+
from tracebloc.utils.model_loading import remove_tmp_file
|
|
28
29
|
from tracebloc.utils.warnings_once import warnings_once
|
|
29
30
|
|
|
30
31
|
#: The ``display_data`` MIME type the payload travels under. Versioned: a
|
|
@@ -240,7 +241,7 @@ def _sanitise(message):
|
|
|
240
241
|
def _parameter_count(task):
|
|
241
242
|
"""PyTorch models only, as the backend's ``parameter_count``."""
|
|
242
243
|
from tracebloc.utils.constants import PYTORCH_FRAMEWORK
|
|
243
|
-
from tracebloc.utils.
|
|
244
|
+
from tracebloc.utils.model_params import get_model_params_count
|
|
244
245
|
|
|
245
246
|
if task.framework != PYTORCH_FRAMEWORK:
|
|
246
247
|
return None
|
|
@@ -37,16 +37,17 @@ import requests
|
|
|
37
37
|
from requests.adapters import HTTPAdapter
|
|
38
38
|
from urllib3.util.retry import Retry
|
|
39
39
|
|
|
40
|
-
from tracebloc.
|
|
40
|
+
from tracebloc.api.responses import _extract_error_message
|
|
41
41
|
from tracebloc.config import TraceblocConfig
|
|
42
42
|
from tracebloc.exceptions import APIError, AuthenticationError
|
|
43
|
-
from tracebloc.utils.
|
|
43
|
+
from tracebloc.utils.errors import format_exception
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
#: The distribution this package installs as -- ``[project] name`` in
|
|
47
47
|
#: ``pyproject.toml`` (``tests/test_client.py`` holds the two together).
|
|
48
48
|
#: Not ``tracebloc_package``: that is the pre-0.8.0 redirect distribution,
|
|
49
|
-
#: which depends on this one, so ``tracebloc`` is installed either way
|
|
49
|
+
#: which depends on this one, so ``tracebloc`` is installed either way
|
|
50
|
+
#: (its import path was removed in 2.0.0; the distribution still resolves).
|
|
50
51
|
_DISTRIBUTION = "tracebloc"
|
|
51
52
|
|
|
52
53
|
#: What the version reads as when the distribution's metadata is missing
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"""Compatibility with older SDK versions and optional extras (RFC-0348 C.3).
|
|
2
|
+
|
|
3
|
+
``deprecation`` holds the rename and retirement warnings; ``frameworks`` the
|
|
4
|
+
guarded imports for the optional ML-framework extras. The old root modules
|
|
5
|
+
``tracebloc.compat.deprecation`` and ``tracebloc.compat.frameworks`` re-export them.
|
|
6
|
+
"""
|
tracebloc-1.2.92/tracebloc/_deprecation.py → tracebloc-2.0.0/tracebloc/compat/deprecation.py
RENAMED
|
@@ -5,7 +5,7 @@ The camelCase-rename aliases below date from the 0.7.0 rename.
|
|
|
5
5
|
Usage in a module that wants to expose old camelCase class names as
|
|
6
6
|
deprecated aliases for the new snake-case or Pascal-cleaned versions::
|
|
7
7
|
|
|
8
|
-
from tracebloc.
|
|
8
|
+
from tracebloc.compat.deprecation import deprecated_aliases
|
|
9
9
|
|
|
10
10
|
class LinkModelDataset:
|
|
11
11
|
...
|
tracebloc-1.2.92/tracebloc/_framework_utils.py → tracebloc-2.0.0/tracebloc/compat/frameworks.py
RENAMED
|
@@ -69,7 +69,7 @@ def _declared_requirements() -> list[str]:
|
|
|
69
69
|
return list(metadata.distribution(_DISTRIBUTION).requires or [])
|
|
70
70
|
except metadata.PackageNotFoundError:
|
|
71
71
|
pass
|
|
72
|
-
pyproject = Path(__file__).resolve().
|
|
72
|
+
pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
|
|
73
73
|
try:
|
|
74
74
|
import tomllib
|
|
75
75
|
|
|
@@ -235,7 +235,7 @@ def torch_strict_load(model: Any, written: WrittenPackage) -> CheckFinding:
|
|
|
235
235
|
|
|
236
236
|
def pickle_strict_load(model: Any, written: WrittenPackage) -> tuple[Any, CheckFinding]:
|
|
237
237
|
"""The shipped fitted model unpickles to the class ``MyModel()`` builds."""
|
|
238
|
-
from tracebloc.raw_mode import load_beside
|
|
238
|
+
from tracebloc.raw_mode.fitted_model import load_beside
|
|
239
239
|
|
|
240
240
|
if written.weights is None:
|
|
241
241
|
return None, CheckFinding(
|
|
@@ -355,7 +355,7 @@ class HuggingFaceFamily:
|
|
|
355
355
|
return None
|
|
356
356
|
if "auto_map" in config:
|
|
357
357
|
return None # the model ships its own code: the own-code converter's
|
|
358
|
-
from tracebloc.
|
|
358
|
+
from tracebloc.compat.frameworks import require_module
|
|
359
359
|
|
|
360
360
|
transformers = require_module("transformers", "converting a Hugging Face model")
|
|
361
361
|
read_from = CONFIG_FILE
|
|
@@ -67,7 +67,7 @@ def model_type_of(folder: Path, config: Any) -> str | None:
|
|
|
67
67
|
architectures = _names(config.get("architectures"))
|
|
68
68
|
if "auto_map" in config or not architectures:
|
|
69
69
|
return None
|
|
70
|
-
from tracebloc.
|
|
70
|
+
from tracebloc.compat.frameworks import require_module
|
|
71
71
|
|
|
72
72
|
require_module("transformers", "converting a Hugging Face model")
|
|
73
73
|
return _architecture_model_type(folder, architectures[0])
|
|
@@ -23,9 +23,9 @@ from tracebloc.convert.interfaces import (
|
|
|
23
23
|
GeneratedPackage, Proof, Provenance, Recognition, RefusalCause, SourcedValue,
|
|
24
24
|
UseCaseTask, ValueSource,
|
|
25
25
|
)
|
|
26
|
-
from tracebloc.
|
|
26
|
+
from tracebloc.compat.frameworks import extra_for_module
|
|
27
27
|
from tracebloc.utils.constants import Framework, TaskCategory
|
|
28
|
-
from tracebloc.utils.
|
|
28
|
+
from tracebloc.utils.errors import format_exception
|
|
29
29
|
|
|
30
30
|
#: The libraries whose fitted models this family reads, by top-level module.
|
|
31
31
|
FRAMEWORK_OF_ROOT = {
|
|
@@ -69,7 +69,7 @@ from tracebloc.utils.constants import (
|
|
|
69
69
|
PYTORCH_FRAMEWORK,
|
|
70
70
|
_StringEnum,
|
|
71
71
|
)
|
|
72
|
-
from tracebloc.utils.
|
|
72
|
+
from tracebloc.utils.errors import format_exception
|
|
73
73
|
from tracebloc.validation.header_rules import (
|
|
74
74
|
missing_framework_message,
|
|
75
75
|
required_values,
|
|
@@ -27,7 +27,7 @@ from tracebloc.convert.interfaces import (
|
|
|
27
27
|
)
|
|
28
28
|
from tracebloc.convert.package import SEED_EXCLUDED_PREFIXES, WrittenPackage
|
|
29
29
|
from tracebloc.utils.constants import Framework, TaskCategory
|
|
30
|
-
from tracebloc.utils.
|
|
30
|
+
from tracebloc.utils.errors import format_exception
|
|
31
31
|
from tracebloc.validation.header_rules import SHAPE_VALUES
|
|
32
32
|
|
|
33
33
|
#: The probe's batch, and its sequence length's ceiling.
|
|
@@ -171,7 +171,7 @@ def probe_for(category: str, header: Mapping[str, Any], model: Any) -> Probe:
|
|
|
171
171
|
generator = torch.Generator().manual_seed(1234)
|
|
172
172
|
kind = input_kind(category)
|
|
173
173
|
if kind == "image":
|
|
174
|
-
from tracebloc.utils.
|
|
174
|
+
from tracebloc.utils.data_probes import detect_input_channels
|
|
175
175
|
|
|
176
176
|
side = int(header.get("image_size") or 224)
|
|
177
177
|
channels = detect_input_channels(model)
|
|
@@ -19,7 +19,7 @@ from pathlib import Path
|
|
|
19
19
|
from typing import Any, Iterable, Mapping
|
|
20
20
|
|
|
21
21
|
from tracebloc.convert.interfaces import ConversionRefusedError, RefusalCause
|
|
22
|
-
from tracebloc.utils.
|
|
22
|
+
from tracebloc.utils.errors import format_exception
|
|
23
23
|
|
|
24
24
|
#: Files that hold weights the converter reads.
|
|
25
25
|
WEIGHT_SUFFIXES = (".ckpt", ".pt", ".pth", ".bin", ".safetensors")
|
|
@@ -350,7 +350,7 @@ def state_dict_shapes(written: WrittenPackage) -> dict[str, tuple[int, ...]]:
|
|
|
350
350
|
Built on the meta device, which allocates no memory, and on the CPU when
|
|
351
351
|
the model's constructor cannot run there.
|
|
352
352
|
"""
|
|
353
|
-
from tracebloc.
|
|
353
|
+
from tracebloc.compat.frameworks import require_module
|
|
354
354
|
|
|
355
355
|
torch = require_module("torch", purpose="deriving a converted PyTorch model's head")
|
|
356
356
|
with tempfile.TemporaryDirectory(prefix="tracebloc_probe_") as raw:
|
|
@@ -22,7 +22,7 @@ from tracebloc.convert.interfaces import CheckFinding, ConversionRefusedError
|
|
|
22
22
|
from tracebloc.convert.interfaces import RefusalCause
|
|
23
23
|
from tracebloc.convert.padding import declared_padding, designate_padding
|
|
24
24
|
from tracebloc.utils.constants import _StringEnum
|
|
25
|
-
from tracebloc.utils.
|
|
25
|
+
from tracebloc.utils.errors import format_exception
|
|
26
26
|
|
|
27
27
|
#: The file name the platform reads a tokenizer from.
|
|
28
28
|
TOKENIZER_FILE = "tokenizer.json"
|
|
@@ -19,14 +19,14 @@ from importlib import metadata
|
|
|
19
19
|
from pathlib import Path
|
|
20
20
|
from typing import Iterable, Mapping
|
|
21
21
|
|
|
22
|
-
from tracebloc.
|
|
22
|
+
from tracebloc.compat.frameworks import _normalize as _canonical
|
|
23
23
|
from tracebloc.convert.interfaces import (
|
|
24
24
|
CheckFinding,
|
|
25
25
|
ConversionRefusedError,
|
|
26
26
|
ConverterWiringError,
|
|
27
27
|
RefusalCause,
|
|
28
28
|
)
|
|
29
|
-
from tracebloc.utils.
|
|
29
|
+
from tracebloc.utils.errors import format_exception
|
|
30
30
|
|
|
31
31
|
#: The vendored copy of the training images' requirements.
|
|
32
32
|
PINS_FILE = (
|
|
@@ -41,7 +41,7 @@ import uuid
|
|
|
41
41
|
from tracebloc.contracts import survival_payload
|
|
42
42
|
from tracebloc.exceptions import FrameworkNotInstalledError, LifelinesWeightsError
|
|
43
43
|
from tracebloc.utils.entry_point import missing_entry_point_message
|
|
44
|
-
from tracebloc.utils.
|
|
44
|
+
from tracebloc.utils.errors import format_exception
|
|
45
45
|
from tracebloc.utils.safetensors_io import load_weights_with_envelope
|
|
46
46
|
|
|
47
47
|
#: The extra that installs everything :func:`load_lifelines_model` imports.
|
|
@@ -48,9 +48,9 @@ from urllib.parse import urlsplit
|
|
|
48
48
|
|
|
49
49
|
import requests
|
|
50
50
|
|
|
51
|
-
from .
|
|
52
|
-
from
|
|
53
|
-
from
|
|
51
|
+
from ..api.responses import _extract_error_message
|
|
52
|
+
from ..exceptions import APIError
|
|
53
|
+
from ..fetch import (
|
|
54
54
|
_CHUNK,
|
|
55
55
|
_clear_abandoned_temps,
|
|
56
56
|
_read_manifest,
|
|
@@ -60,7 +60,7 @@ from .fetch import (
|
|
|
60
60
|
expected_names,
|
|
61
61
|
zoo_template_stem,
|
|
62
62
|
)
|
|
63
|
-
from
|
|
63
|
+
from ..utils.errors import format_exception, print_error
|
|
64
64
|
|
|
65
65
|
#: The backend's seed key: a zoo template's file stem.
|
|
66
66
|
_STEM = re.compile(r"[a-z0-9_]{1,128}")
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.auth.env_login`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.auth.env_login import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
TOKEN_ENV_VAR,
|
|
9
|
+
API_URL_ENV_VAR,
|
|
10
|
+
APP_URL_ENV_VAR,
|
|
11
|
+
ENV_TOKEN_SCHEME,
|
|
12
|
+
_ALLOWED_URL_SCHEMES,
|
|
13
|
+
_has_forbidden_character,
|
|
14
|
+
_read_var,
|
|
15
|
+
_validate_base_url,
|
|
16
|
+
EnvironmentLogin,
|
|
17
|
+
read_environment_login,
|
|
18
|
+
)
|
|
@@ -115,7 +115,7 @@ class NotebookContextError(TraceblocError, ValueError):
|
|
|
115
115
|
|
|
116
116
|
class LifelinesWeightsError(TraceblocError, ValueError):
|
|
117
117
|
"""Raised when a downloaded lifelines weights file cannot be loaded into a
|
|
118
|
-
fitter (``tracebloc.lifelines_weights.load_lifelines_model``): it is not a
|
|
118
|
+
fitter (``tracebloc.downloads.lifelines_weights.load_lifelines_model``): it is not a
|
|
119
119
|
coefficients file of the version this SDK reads, or the model given is not a
|
|
120
120
|
fitter of the file's estimator."""
|
|
121
121
|
|
|
@@ -61,9 +61,9 @@ from urllib.parse import quote
|
|
|
61
61
|
|
|
62
62
|
import requests
|
|
63
63
|
|
|
64
|
-
from .
|
|
64
|
+
from .api.responses import _extract_error_message as _error_message
|
|
65
65
|
from .exceptions import APIError
|
|
66
|
-
from .utils.
|
|
66
|
+
from .utils.errors import format_exception
|
|
67
67
|
|
|
68
68
|
PARTS = ("model", "weights", "tokenizer")
|
|
69
69
|
|
|
@@ -45,11 +45,11 @@ from typing import Any, Mapping
|
|
|
45
45
|
|
|
46
46
|
from termcolor import colored
|
|
47
47
|
|
|
48
|
-
from .
|
|
48
|
+
from .api.responses import _extract_error_message
|
|
49
49
|
from .exceptions import APIError, InferenceRefusedError
|
|
50
50
|
from .utils.constants import IMAGE_DATA_TYPES
|
|
51
51
|
from .utils.class_order import class_order_text
|
|
52
|
-
from .utils.
|
|
52
|
+
from .utils.errors import format_exception
|
|
53
53
|
|
|
54
54
|
#: The platform's inference-only start.
|
|
55
55
|
INFERENCE_START_PATH = "experiments/inference-only/"
|
|
@@ -96,9 +96,7 @@ def default_run_name(model: str) -> str:
|
|
|
96
96
|
def experiment_fields(plan) -> dict:
|
|
97
97
|
"""The linked plan's experiment fields, as a training start builds them
|
|
98
98
|
(``ExperimentSubmitter.build_payload``), less :data:`NOT_SENT`."""
|
|
99
|
-
payload = plan.
|
|
100
|
-
include_data_per_edge=False
|
|
101
|
-
)
|
|
99
|
+
payload = plan._submitter.build_payload(include_data_per_edge=False)
|
|
102
100
|
return {k: v for k, v in payload.items() if k not in NOT_SENT}
|
|
103
101
|
|
|
104
102
|
|
|
@@ -398,7 +396,7 @@ def user_run_inference(
|
|
|
398
396
|
# set here or a 1-channel model can never start. It re-runs the channel
|
|
399
397
|
# check, and the request carries it as a training start's does.
|
|
400
398
|
plan.data_type(data_type)
|
|
401
|
-
if not plan.
|
|
399
|
+
if not plan._eligibility_passed:
|
|
402
400
|
# The same guard a training start has: the link prints what failed
|
|
403
401
|
# (an image-channel mismatch, a size error) and returns the plan anyway.
|
|
404
402
|
raise ValueError(
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.linking.library`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.linking.library import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
_library_id,
|
|
9
|
+
fetch_library_model,
|
|
10
|
+
user_fetch_library_model,
|
|
11
|
+
)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.downloads.lifelines_weights`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.downloads.lifelines_weights import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
EXTRA,
|
|
9
|
+
_REQUIRED_MODULES,
|
|
10
|
+
_ENTRY_POINT,
|
|
11
|
+
_NOT_COEFFICIENTS,
|
|
12
|
+
_require_modules,
|
|
13
|
+
_model_from_file,
|
|
14
|
+
_read,
|
|
15
|
+
load_lifelines_model,
|
|
16
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Re-exports only (RFC-0348 C.3): moved to :mod:`tracebloc.linking.model_dataset`.
|
|
2
|
+
|
|
3
|
+
Every name stays importable from this path for existing callers; new code
|
|
4
|
+
imports from the new module.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from tracebloc.linking.model_dataset import ( # noqa: F401 (re-export, RFC-0348 C.3)
|
|
8
|
+
LinkModelDataset,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
from tracebloc.compat.deprecation import deprecated_aliases
|
|
12
|
+
|
|
13
|
+
__getattr__, __dir__ = deprecated_aliases(
|
|
14
|
+
{
|
|
15
|
+
"LinkModelDataSet": "LinkModelDataset",
|
|
16
|
+
}
|
|
17
|
+
)
|