labelbox 3.78.2__tar.gz → 4.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.
- {labelbox-3.78.2 → labelbox-4.0.0}/CHANGELOG.md +5 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/PKG-INFO +3 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/pyproject.toml +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/__init__.py +35 -60
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/__init__.py +0 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/annotation.py +2 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/base_annotation.py +4 -2
- labelbox-4.0.0/src/labelbox/data/annotation_types/classification/__init__.py +2 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/classification/classification.py +7 -53
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/base_data.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/conversation.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/generic_data_row_data.py +3 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/raster.py +16 -18
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/text.py +11 -14
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/tiled_image.py +13 -16
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/video.py +11 -13
- labelbox-4.0.0/src/labelbox/data/annotation_types/feature.py +21 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/geometry.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/line.py +2 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/mask.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/polygon.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/label.py +14 -13
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/llm_prompt_response/prompt.py +2 -6
- labelbox-4.0.0/src/labelbox/data/annotation_types/metrics/base.py +35 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/metrics/confusion_matrix.py +5 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/metrics/scalar.py +9 -12
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/mmc.py +12 -4
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/ner/document_entity.py +4 -4
- labelbox-4.0.0/src/labelbox/data/annotation_types/ner/text_entity.py +19 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/relationship.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/types.py +3 -13
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/video.py +15 -13
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/mixins.py +9 -24
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/ontology.py +4 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/annotation.py +5 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/categories.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/converter.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/instance_dataset.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/panoptic_dataset.py +2 -2
- labelbox-4.0.0/src/labelbox/data/serialization/coco/path.py +9 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/labelbox_v1/classification.py +4 -22
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/labelbox_v1/converter.py +1 -1
- labelbox-4.0.0/src/labelbox/data/serialization/labelbox_v1/feature.py +28 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/labelbox_v1/label.py +20 -27
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/labelbox_v1/objects.py +26 -22
- labelbox-4.0.0/src/labelbox/data/serialization/ndjson/base.py +50 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/classification.py +59 -53
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/converter.py +6 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/label.py +53 -13
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/metric.py +11 -18
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/mmc.py +13 -16
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/objects.py +28 -32
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/relationship.py +4 -4
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/bulk_import_request.py +61 -68
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/data_row_metadata.py +41 -47
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/dataset.py +1 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/embedding.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/export_task.py +10 -11
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/foundry/app.py +8 -7
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/foundry/foundry_client.py +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/foundry/model.py +3 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/internal/data_row_uploader.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/internal/data_row_upsert_item.py +2 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/label_score.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/labeling_service.py +2 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/labeling_service_dashboard.py +2 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/ontology.py +7 -18
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/project.py +6 -6
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/project_overview.py +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/search_filters.py +52 -43
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/send_to_annotate_params.py +8 -7
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/user_group.py +3 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/utils.py +7 -9
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/conftest.py +5 -19
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/conftest.py +481 -396
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_generic_data_types.py +96 -111
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/classification/test_classification.py +24 -74
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/data/test_raster.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/data/test_text.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/data/test_video.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/geometry/test_line.py +3 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/geometry/test_mask.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/geometry/test_point.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/geometry/test_polygon.py +4 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/geometry/test_rectangle.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_annotation.py +5 -6
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_label.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_metrics.py +13 -43
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_ner.py +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_tiled_image.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_video.py +2 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/classification_import_global_key.json +2 -2
- labelbox-4.0.0/tests/data/assets/ndjson/metric_import.json +10 -0
- labelbox-4.0.0/tests/data/assets/ndjson/metric_import_global_key.json +10 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/video_import.json +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/video_import_name_only.json +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/labelbox_v1/test_document.py +2 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/labelbox_v1/test_image.py +1 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/labelbox_v1/test_text.py +2 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/labelbox_v1/test_tiled_image.py +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/labelbox_v1/test_unknown_media.py +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_checklist.py +8 -9
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_conversation.py +1 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_data_gen.py +2 -4
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_dicom.py +13 -5
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_document.py +2 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_mmc.py +8 -6
- labelbox-4.0.0/tests/data/serialization/ndjson/test_ndlabel_subclass_matching.py +17 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_radio.py +7 -4
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_video.py +23 -18
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/conftest.py +0 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_data_row_delete_metadata.py +6 -6
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_embedding.py +3 -7
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_filtering.py +0 -3
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_foundry.py +4 -4
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_labeling_dashboard.py +1 -2
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_user_management.py +65 -17
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_delete_batch_data_row_metadata.py +4 -4
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_search_filters.py +4 -4
- labelbox-3.78.2/src/labelbox/data/annotation_types/classification/__init__.py +0 -2
- labelbox-3.78.2/src/labelbox/data/annotation_types/feature.py +0 -31
- labelbox-3.78.2/src/labelbox/data/annotation_types/metrics/base.py +0 -35
- labelbox-3.78.2/src/labelbox/data/annotation_types/ner/text_entity.py +0 -19
- labelbox-3.78.2/src/labelbox/data/serialization/coco/path.py +0 -9
- labelbox-3.78.2/src/labelbox/data/serialization/labelbox_v1/feature.py +0 -31
- labelbox-3.78.2/src/labelbox/data/serialization/ndjson/base.py +0 -58
- labelbox-3.78.2/src/labelbox/pydantic_compat.py +0 -34
- labelbox-3.78.2/tests/data/assets/ndjson/metric_import.json +0 -1
- labelbox-3.78.2/tests/data/assets/ndjson/metric_import_global_key.json +0 -1
- {labelbox-3.78.2 → labelbox-4.0.0}/.gitignore +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/.yapfignore +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/Dockerfile +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/README.md +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/mypy.ini +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/adv_client.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/client.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/collection.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/audio.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/dicom.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/document.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/html.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/llm_prompt_creation.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/llm_prompt_response_creation.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/llm_response_creation.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/point.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/geometry/rectangle.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/llm_prompt_response/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/metrics/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/ner/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/ner/conversation_entity.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/generator.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/confusion_matrix/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/confusion_matrix/calculation.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/confusion_matrix/confusion_matrix.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/group.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/iou/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/iou/calculation.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/metrics/iou/iou.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/coco/image.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/labelbox_v1/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/serialization/ndjson/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/exceptions.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/orm/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/orm/comparison.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/orm/db_object.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/orm/model.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/orm/query.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/pagination.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/parser.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/annotation_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/asset_attachment.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/batch.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/benchmark.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/catalog.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/confidence_presence_checker.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/conflict_resolution_strategy.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/consensus_settings.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/create_batches_task.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/data_row.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/enums.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/export_filters.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/export_params.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/foundry/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/iam_integration.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/id_type.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/identifiable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/identifiables.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/internal/datarow_upload_constants.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/internal/descriptor_file_creator.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/invite.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/label.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/labeling_frontend.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/labeling_service_status.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/media_type.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/model.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/model_config.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/model_run.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/ontology_kind.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/organization.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/project_model_config.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/project_resource_tag.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/quality_mode.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/queue_mode.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/resource_tag.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/review.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/role.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/serialization.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/slice.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/task.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/task_queue.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/user.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/schema/webhook.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/types.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/typing_imports.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483.pdf +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/assets/conversation-1.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/assets/loremipsum.pdf +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_annotation_import_limit.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_bulk_import_request.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_data_types.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_label_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_mal_prediction_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_mea_prediction_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_model.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_model_run.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_ndjson_validation.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_send_to_annotate_mea.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_import/test_upsert_prediction_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/classification/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/data/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/geometry/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_collection.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/annotation_types/test_text.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000129054.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000141328.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000147498.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000184324.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000188465.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000245764.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000311303.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000343706.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000356387.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000370711.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000385029.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000393226.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000434230.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000458755.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000458768.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000462904.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000475150.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000532481.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000532493.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/images/000000546823.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/instances.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000129054.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000141328.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000147498.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000184324.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000188465.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000245764.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000311303.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000343706.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000356387.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000370711.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000385029.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000393226.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000434230.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000458755.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000458768.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000462904.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000475150.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000532481.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000532493.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/masks/000000546823.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/panoptic.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/coco/rle.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/highly_nested_image.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/image_export.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/pdf_export.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/text_export.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/tiled_image_export.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/unkown_media_type_export.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/labelbox_v1/video_export.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/line.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/mask.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/classification_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/classification_import_name_only.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/conversation_entity_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/conversation_entity_import_global_key.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/conversation_entity_without_confidence_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/custom_confusion_matrix_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/custom_scalar_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/image_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/image_import_global_key.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/image_import_name_only.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/mmc_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/nested_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/nested_import_name_only.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/pdf_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/pdf_import_global_key.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/pdf_import_name_only.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/polyline_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/polyline_import_global_key.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/polyline_without_confidence_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/rectangle_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/relationship_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/text_entity_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/text_entity_import_global_key.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/text_entity_without_confidence_import.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/ndjson/video_import_global_key.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/point.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/polygon.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/rectangle.png +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/assets/sample_text.txt +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/conftest.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/conftest.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_catalog.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_data_rows.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_dataset.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_model_run.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_slice.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_export_video.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/legacy/test_legacy_export.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/streamable/test_export_data_rows_streamable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/streamable/test_export_dataset_streamable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/streamable/test_export_embeddings_streamable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/streamable/test_export_model_run_streamable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/streamable/test_export_project_streamable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/export/streamable/test_export_video_streamable.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/confusion_matrix/conftest.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/confusion_matrix/test_confusion_matrix_data_row.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/confusion_matrix/test_confusion_matrix_feature.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/iou/data_row/conftest.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/iou/data_row/test_data_row_iou.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/iou/feature/conftest.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/metrics/iou/feature/test_feature_iou.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/coco/test_coco.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/labelbox_v1/test_video.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/__init__.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_classification.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_export_video_objects.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_free_text.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_global_key.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_image.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_metric.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_nested.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_polyline.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_rectangle.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_relationship.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_text.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/serialization/ndjson/test_text_entity.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/test_data_row_metadata.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/data/test_prefetch_generator.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/media/bulk_conversation.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/media/cat.mp4 +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/media/sample_image.jpg +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/media/sample_pdf.pdf +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/schema/test_user_group.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/snapshots/test_data_rows.test_data_row_bulk_creation_with_same_global_keys.failed_data_rows.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/snapshots/test_task.test_task_errors.errors.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/snapshots/test_task.test_task_errors.failed_data_rows.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/snapshots/test_task.test_task_success_json.json +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_batch.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_batches.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_benchmark.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_chat_evaluation_ontology_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_client_errors.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_data_rows.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_data_rows_upsert.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_data_upload.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_dataset.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_dates.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_delegated_access.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_ephemeral.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_feature_schema.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_global_keys.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_label.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_labeling_frontend.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_labeling_parameter_overrides.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_labeling_service.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_legacy_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_model_config.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_offline_chat_evaluation_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_ontology.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_pagination.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_project_model_config.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_project_set_model_setup_complete.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_project_setup.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_prompt_response_generation_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_response_creation_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_send_to_annotate.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_sorting.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_task.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_task_queue.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_toggle_mal.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_user_and_org.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/integration/test_webhook.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/conftest.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/export_task/test_export_task.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/export_task/test_unit_file_converter.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/export_task/test_unit_file_retriever_by_line.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/export_task/test_unit_file_retriever_by_offset.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/export_task/test_unit_json_converter.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/schema/test_user_group.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_annotation_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_client.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_data_row_upsert_data.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_exceptions.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_label_data_type.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_mal_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_ndjson_parsing.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_project.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_queue_mode.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_case_change.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_descriptor_file_creator.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_entity_meta.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_export_filters.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_filter.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_identifiables.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_label_import.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_ontology.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_ontology_kind.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_project_validate_labeling_parameter_overrides.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_query.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_rand_gen.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_unit_webhook.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/unit/test_utils.py +0 -0
- {labelbox-3.78.2 → labelbox-4.0.0}/tests/utils.py +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
-
# Version
|
|
2
|
+
# Version 4.0.0 (2024-09-10)
|
|
3
|
+
## Added
|
|
4
|
+
* BREAKING CHANGE for pydantic V1 users: Converted SDK to use pydantic V2([#1738](https://github.com/Labelbox/labelbox-python/pull/1738))
|
|
5
|
+
* Automation test support for multiple sdk versions([#1792](https://github.com/Labelbox/labelbox-python/pull/1792))
|
|
3
6
|
## Fixed
|
|
4
|
-
*
|
|
5
|
-
* NOTE: backported from v.5.2.1
|
|
7
|
+
* Flaky tests([#1793](https://github.com/Labelbox/labelbox-python/pull/1793))
|
|
6
8
|
|
|
7
9
|
# Version 3.78.1 (2024-09-10)
|
|
8
10
|
## Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: labelbox
|
|
3
|
-
Version:
|
|
3
|
+
Version: 4.0.0
|
|
4
4
|
Summary: Labelbox Python API
|
|
5
5
|
Project-URL: Homepage, https://labelbox.com/
|
|
6
6
|
Project-URL: Documentation, https://labelbox-python.readthedocs.io/en/latest/
|
|
@@ -26,7 +26,7 @@ Requires-Python: >=3.8
|
|
|
26
26
|
Requires-Dist: geojson>=3.1.0
|
|
27
27
|
Requires-Dist: google-api-core>=1.22.1
|
|
28
28
|
Requires-Dist: mypy==1.10.1
|
|
29
|
-
Requires-Dist: pydantic>=
|
|
29
|
+
Requires-Dist: pydantic>=2.0
|
|
30
30
|
Requires-Dist: python-dateutil<2.10.0,>=2.8.2
|
|
31
31
|
Requires-Dist: requests>=2.22.0
|
|
32
32
|
Requires-Dist: strenum>=0.4.15
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "labelbox"
|
|
3
|
-
version = "
|
|
3
|
+
version = "4.0.0"
|
|
4
4
|
description = "Labelbox Python API"
|
|
5
5
|
authors = [{ name = "Labelbox", email = "engineering@labelbox.com" }]
|
|
6
6
|
dependencies = [
|
|
7
7
|
"google-api-core>=1.22.1",
|
|
8
|
-
"pydantic>=
|
|
8
|
+
"pydantic>=2.0",
|
|
9
9
|
"python-dateutil>=2.8.2, <2.10.0",
|
|
10
10
|
"requests>=2.22.0",
|
|
11
11
|
"strenum>=0.4.15",
|
|
@@ -1,73 +1,48 @@
|
|
|
1
1
|
name = "labelbox"
|
|
2
2
|
|
|
3
|
-
__version__ = "
|
|
3
|
+
__version__ = "4.0.0"
|
|
4
4
|
|
|
5
5
|
from labelbox.client import Client
|
|
6
|
-
from labelbox.schema.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
MEAPredictionImport,
|
|
10
|
-
MEAToMALPredictionImport,
|
|
11
|
-
)
|
|
12
|
-
from labelbox.schema.asset_attachment import AssetAttachment
|
|
13
|
-
from labelbox.schema.batch import Batch
|
|
14
|
-
from labelbox.schema.benchmark import Benchmark
|
|
6
|
+
from labelbox.schema.project import Project
|
|
7
|
+
from labelbox.schema.model import Model
|
|
8
|
+
from labelbox.schema.model_config import ModelConfig
|
|
15
9
|
from labelbox.schema.bulk_import_request import BulkImportRequest
|
|
16
|
-
from labelbox.schema.
|
|
17
|
-
from labelbox.schema.data_row import DataRow
|
|
18
|
-
from labelbox.schema.data_row_metadata import (
|
|
19
|
-
DataRowMetadata,
|
|
20
|
-
DataRowMetadataField,
|
|
21
|
-
DataRowMetadataOntology,
|
|
22
|
-
DeleteDataRowMetadata,
|
|
23
|
-
)
|
|
10
|
+
from labelbox.schema.annotation_import import MALPredictionImport, MEAPredictionImport, LabelImport, MEAToMALPredictionImport
|
|
24
11
|
from labelbox.schema.dataset import Dataset
|
|
12
|
+
from labelbox.schema.data_row import DataRow
|
|
13
|
+
from labelbox.schema.catalog import Catalog
|
|
25
14
|
from labelbox.schema.enums import AnnotationImportState
|
|
26
|
-
from labelbox.schema.export_task import (
|
|
27
|
-
BufferedJsonConverterOutput,
|
|
28
|
-
ExportTask,
|
|
29
|
-
FileConverter,
|
|
30
|
-
FileConverterOutput,
|
|
31
|
-
JsonConverter,
|
|
32
|
-
JsonConverterOutput,
|
|
33
|
-
StreamType,
|
|
34
|
-
)
|
|
35
|
-
from labelbox.schema.iam_integration import IAMIntegration
|
|
36
|
-
from labelbox.schema.identifiable import GlobalKey, UniqueId
|
|
37
|
-
from labelbox.schema.identifiables import DataRowIds, GlobalKeys, UniqueIds
|
|
38
|
-
from labelbox.schema.invite import Invite, InviteLimit
|
|
39
15
|
from labelbox.schema.label import Label
|
|
40
|
-
from labelbox.schema.
|
|
41
|
-
from labelbox.schema.
|
|
42
|
-
from labelbox.schema.
|
|
43
|
-
from labelbox.schema.labeling_service_dashboard import LabelingServiceDashboard
|
|
44
|
-
from labelbox.schema.labeling_service_status import LabelingServiceStatus
|
|
45
|
-
from labelbox.schema.media_type import MediaType
|
|
46
|
-
from labelbox.schema.model import Model
|
|
47
|
-
from labelbox.schema.model_config import ModelConfig
|
|
48
|
-
from labelbox.schema.model_run import DataSplit, ModelRun
|
|
49
|
-
from labelbox.schema.ontology import (
|
|
50
|
-
Classification,
|
|
51
|
-
FeatureSchema,
|
|
52
|
-
Ontology,
|
|
53
|
-
OntologyBuilder,
|
|
54
|
-
Option,
|
|
55
|
-
PromptResponseClassification,
|
|
56
|
-
ResponseOption,
|
|
57
|
-
Tool,
|
|
58
|
-
)
|
|
59
|
-
from labelbox.schema.ontology_kind import OntologyKind
|
|
16
|
+
from labelbox.schema.batch import Batch
|
|
17
|
+
from labelbox.schema.review import Review
|
|
18
|
+
from labelbox.schema.user import User
|
|
60
19
|
from labelbox.schema.organization import Organization
|
|
61
|
-
from labelbox.schema.
|
|
20
|
+
from labelbox.schema.task import Task
|
|
21
|
+
from labelbox.schema.export_task import StreamType, ExportTask, JsonConverter, JsonConverterOutput, FileConverter, FileConverterOutput, BufferedJsonConverterOutput
|
|
22
|
+
from labelbox.schema.labeling_frontend import LabelingFrontend, LabelingFrontendOptions
|
|
23
|
+
from labelbox.schema.asset_attachment import AssetAttachment
|
|
24
|
+
from labelbox.schema.webhook import Webhook
|
|
25
|
+
from labelbox.schema.ontology import Ontology, OntologyBuilder, Classification, Option, Tool, FeatureSchema
|
|
26
|
+
from labelbox.schema.ontology import PromptResponseClassification
|
|
27
|
+
from labelbox.schema.ontology import ResponseOption
|
|
28
|
+
from labelbox.schema.role import Role, ProjectRole
|
|
29
|
+
from labelbox.schema.invite import Invite, InviteLimit
|
|
30
|
+
from labelbox.schema.data_row_metadata import DataRowMetadataOntology, DataRowMetadataField, DataRowMetadata, DeleteDataRowMetadata
|
|
31
|
+
from labelbox.schema.model_run import ModelRun, DataSplit
|
|
32
|
+
from labelbox.schema.benchmark import Benchmark
|
|
33
|
+
from labelbox.schema.iam_integration import IAMIntegration
|
|
34
|
+
from labelbox.schema.resource_tag import ResourceTag
|
|
62
35
|
from labelbox.schema.project_model_config import ProjectModelConfig
|
|
63
|
-
from labelbox.schema.project_overview import ProjectOverview, ProjectOverviewDetailed
|
|
64
36
|
from labelbox.schema.project_resource_tag import ProjectResourceTag
|
|
37
|
+
from labelbox.schema.media_type import MediaType
|
|
38
|
+
from labelbox.schema.slice import Slice, CatalogSlice, ModelSlice
|
|
65
39
|
from labelbox.schema.queue_mode import QueueMode
|
|
66
|
-
from labelbox.schema.resource_tag import ResourceTag
|
|
67
|
-
from labelbox.schema.review import Review
|
|
68
|
-
from labelbox.schema.role import ProjectRole, Role
|
|
69
|
-
from labelbox.schema.slice import CatalogSlice, ModelSlice, Slice
|
|
70
|
-
from labelbox.schema.task import Task
|
|
71
40
|
from labelbox.schema.task_queue import TaskQueue
|
|
72
|
-
from labelbox.schema.
|
|
73
|
-
from labelbox.schema.
|
|
41
|
+
from labelbox.schema.label_score import LabelScore
|
|
42
|
+
from labelbox.schema.identifiables import UniqueIds, GlobalKeys, DataRowIds
|
|
43
|
+
from labelbox.schema.identifiable import UniqueId, GlobalKey
|
|
44
|
+
from labelbox.schema.ontology_kind import OntologyKind
|
|
45
|
+
from labelbox.schema.project_overview import ProjectOverview, ProjectOverviewDetailed
|
|
46
|
+
from labelbox.schema.labeling_service import LabelingService
|
|
47
|
+
from labelbox.schema.labeling_service_dashboard import LabelingServiceDashboard
|
|
48
|
+
from labelbox.schema.labeling_service_status import LabelingServiceStatus
|
|
@@ -7,6 +7,7 @@ from labelbox.data.mixins import ConfidenceMixin, CustomMetricsMixin
|
|
|
7
7
|
|
|
8
8
|
from labelbox.data.annotation_types.classification.classification import ClassificationAnnotation
|
|
9
9
|
from .ner import DocumentEntity, TextEntity, ConversationEntity
|
|
10
|
+
from typing import Optional
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
class ObjectAnnotation(BaseAnnotation, ConfidenceMixin, CustomMetricsMixin):
|
|
@@ -29,4 +30,4 @@ class ObjectAnnotation(BaseAnnotation, ConfidenceMixin, CustomMetricsMixin):
|
|
|
29
30
|
"""
|
|
30
31
|
|
|
31
32
|
value: Union[TextEntity, ConversationEntity, DocumentEntity, Geometry]
|
|
32
|
-
classifications: List[ClassificationAnnotation] = []
|
|
33
|
+
classifications: Optional[List[ClassificationAnnotation]] = []
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import abc
|
|
2
2
|
from uuid import UUID, uuid4
|
|
3
3
|
from typing import Any, Dict, Optional
|
|
4
|
-
from labelbox import pydantic_compat
|
|
5
4
|
|
|
6
5
|
from .feature import FeatureSchema
|
|
6
|
+
from pydantic import PrivateAttr, ConfigDict
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class BaseAnnotation(FeatureSchema, abc.ABC):
|
|
10
10
|
""" Base annotation class. Shouldn't be directly instantiated
|
|
11
11
|
"""
|
|
12
|
-
_uuid: Optional[UUID] =
|
|
12
|
+
_uuid: Optional[UUID] = PrivateAttr()
|
|
13
13
|
extra: Dict[str, Any] = {}
|
|
14
|
+
|
|
15
|
+
model_config = ConfigDict(extra="allow")
|
|
14
16
|
|
|
15
17
|
def __init__(self, **data):
|
|
16
18
|
super().__init__(**data)
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
from typing import Any, Dict, List, Union, Optional
|
|
2
|
-
import warnings
|
|
3
2
|
from labelbox.data.annotation_types.base_annotation import BaseAnnotation
|
|
4
3
|
|
|
5
4
|
from labelbox.data.mixins import ConfidenceMixin, CustomMetricsMixin
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
from typing import Literal
|
|
9
|
-
except:
|
|
10
|
-
from typing_extensions import Literal
|
|
11
|
-
|
|
12
|
-
from labelbox import pydantic_compat
|
|
6
|
+
from pydantic import BaseModel
|
|
13
7
|
from ..feature import FeatureSchema
|
|
14
8
|
|
|
15
9
|
|
|
16
|
-
# TODO: Replace when pydantic adds support for unions that don't coerce types
|
|
17
|
-
class _TempName(ConfidenceMixin, pydantic_compat.BaseModel):
|
|
18
|
-
name: str
|
|
19
|
-
|
|
20
|
-
def dict(self, *args, **kwargs):
|
|
21
|
-
res = super().dict(*args, **kwargs)
|
|
22
|
-
res.pop('name')
|
|
23
|
-
return res
|
|
24
|
-
|
|
25
|
-
|
|
26
10
|
class ClassificationAnswer(FeatureSchema, ConfidenceMixin, CustomMetricsMixin):
|
|
27
11
|
"""
|
|
28
12
|
- Represents a classification option.
|
|
@@ -36,18 +20,10 @@ class ClassificationAnswer(FeatureSchema, ConfidenceMixin, CustomMetricsMixin):
|
|
|
36
20
|
"""
|
|
37
21
|
extra: Dict[str, Any] = {}
|
|
38
22
|
keyframe: Optional[bool] = None
|
|
39
|
-
classifications: List['ClassificationAnnotation'] =
|
|
23
|
+
classifications: Optional[List['ClassificationAnnotation']] = None
|
|
40
24
|
|
|
41
|
-
def dict(self, *args, **kwargs) -> Dict[str, str]:
|
|
42
|
-
res = super().dict(*args, **kwargs)
|
|
43
|
-
if res['keyframe'] is None:
|
|
44
|
-
res.pop('keyframe')
|
|
45
|
-
if res['classifications'] == []:
|
|
46
|
-
res.pop('classifications')
|
|
47
|
-
return res
|
|
48
25
|
|
|
49
|
-
|
|
50
|
-
class Radio(ConfidenceMixin, CustomMetricsMixin, pydantic_compat.BaseModel):
|
|
26
|
+
class Radio(ConfidenceMixin, CustomMetricsMixin, BaseModel):
|
|
51
27
|
""" A classification with only one selected option allowed
|
|
52
28
|
|
|
53
29
|
>>> Radio(answer = ClassificationAnswer(name = "dog"))
|
|
@@ -56,17 +32,16 @@ class Radio(ConfidenceMixin, CustomMetricsMixin, pydantic_compat.BaseModel):
|
|
|
56
32
|
answer: ClassificationAnswer
|
|
57
33
|
|
|
58
34
|
|
|
59
|
-
class Checklist(
|
|
35
|
+
class Checklist(ConfidenceMixin, BaseModel):
|
|
60
36
|
""" A classification with many selected options allowed
|
|
61
37
|
|
|
62
38
|
>>> Checklist(answer = [ClassificationAnswer(name = "cloudy")])
|
|
63
39
|
|
|
64
40
|
"""
|
|
65
|
-
name: Literal["checklist"] = "checklist"
|
|
66
41
|
answer: List[ClassificationAnswer]
|
|
67
42
|
|
|
68
43
|
|
|
69
|
-
class Text(ConfidenceMixin, CustomMetricsMixin,
|
|
44
|
+
class Text(ConfidenceMixin, CustomMetricsMixin, BaseModel):
|
|
70
45
|
""" Free form text
|
|
71
46
|
|
|
72
47
|
>>> Text(answer = "some text answer")
|
|
@@ -75,24 +50,6 @@ class Text(ConfidenceMixin, CustomMetricsMixin, pydantic_compat.BaseModel):
|
|
|
75
50
|
answer: str
|
|
76
51
|
|
|
77
52
|
|
|
78
|
-
class Dropdown(_TempName):
|
|
79
|
-
"""
|
|
80
|
-
- A classification with many selected options allowed .
|
|
81
|
-
- This is not currently compatible with MAL.
|
|
82
|
-
|
|
83
|
-
Deprecation Notice: Dropdown classification is deprecated and will be
|
|
84
|
-
removed in a future release. Dropdown will also
|
|
85
|
-
no longer be able to be created in the Editor on 3/31/2022.
|
|
86
|
-
"""
|
|
87
|
-
name: Literal["dropdown"] = "dropdown"
|
|
88
|
-
answer: List[ClassificationAnswer]
|
|
89
|
-
|
|
90
|
-
def __init__(self, **data: Any):
|
|
91
|
-
super().__init__(**data)
|
|
92
|
-
warnings.warn("Dropdown classification is deprecated and will be "
|
|
93
|
-
"removed in a future release")
|
|
94
|
-
|
|
95
|
-
|
|
96
53
|
class ClassificationAnnotation(BaseAnnotation, ConfidenceMixin,
|
|
97
54
|
CustomMetricsMixin):
|
|
98
55
|
"""Classification annotations (non localized)
|
|
@@ -106,12 +63,9 @@ class ClassificationAnnotation(BaseAnnotation, ConfidenceMixin,
|
|
|
106
63
|
name (Optional[str])
|
|
107
64
|
classifications (Optional[List[ClassificationAnnotation]]): Optional sub classification of the annotation
|
|
108
65
|
feature_schema_id (Optional[Cuid])
|
|
109
|
-
value (Union[Text, Checklist, Radio
|
|
66
|
+
value (Union[Text, Checklist, Radio])
|
|
110
67
|
extra (Dict[str, Any])
|
|
111
68
|
"""
|
|
112
69
|
|
|
113
|
-
value: Union[Text, Checklist, Radio
|
|
70
|
+
value: Union[Text, Checklist, Radio]
|
|
114
71
|
message_id: Optional[str] = None
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
ClassificationAnswer.update_forward_refs()
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from abc import ABC
|
|
2
2
|
from typing import Optional, Dict, List, Any
|
|
3
3
|
|
|
4
|
-
from
|
|
4
|
+
from pydantic import BaseModel
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
class BaseData(
|
|
7
|
+
class BaseData(BaseModel, ABC):
|
|
8
8
|
"""
|
|
9
9
|
Base class for objects representing data.
|
|
10
10
|
This class shouldn't directly be used
|
|
@@ -3,5 +3,5 @@ from labelbox.utils import _NoCoercionMixin
|
|
|
3
3
|
from .base_data import BaseData
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
class ConversationData(BaseData):
|
|
7
|
-
class_name: Literal["ConversationData"] = "ConversationData"
|
|
6
|
+
class ConversationData(BaseData, _NoCoercionMixin):
|
|
7
|
+
class_name: Literal["ConversationData"] = "ConversationData"
|
{labelbox-3.78.2 → labelbox-4.0.0}/src/labelbox/data/annotation_types/data/generic_data_row_data.py
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
from typing import Callable, Literal, Optional
|
|
2
2
|
|
|
3
|
-
from labelbox import pydantic_compat
|
|
4
3
|
from labelbox.data.annotation_types.data.base_data import BaseData
|
|
5
4
|
from labelbox.utils import _NoCoercionMixin
|
|
5
|
+
from pydantic import model_validator
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class GenericDataRowData(BaseData, _NoCoercionMixin):
|
|
@@ -14,7 +14,8 @@ class GenericDataRowData(BaseData, _NoCoercionMixin):
|
|
|
14
14
|
def create_url(self, signer: Callable[[bytes], str]) -> Optional[str]:
|
|
15
15
|
return self.url
|
|
16
16
|
|
|
17
|
-
@
|
|
17
|
+
@model_validator(mode="before")
|
|
18
|
+
@classmethod
|
|
18
19
|
def validate_one_datarow_key_present(cls, data):
|
|
19
20
|
keys = ['external_id', 'global_key', 'uid']
|
|
20
21
|
count = sum([key in data for key in keys])
|
|
@@ -9,19 +9,23 @@ from requests.exceptions import ConnectTimeout
|
|
|
9
9
|
import requests
|
|
10
10
|
import numpy as np
|
|
11
11
|
|
|
12
|
-
from
|
|
12
|
+
from pydantic import BaseModel, model_validator, ConfigDict
|
|
13
13
|
from labelbox.exceptions import InternalServerError
|
|
14
14
|
from .base_data import BaseData
|
|
15
15
|
from ..types import TypedArray
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class RasterData(
|
|
18
|
+
class RasterData(BaseModel, ABC):
|
|
19
19
|
"""Represents an image or segmentation mask.
|
|
20
20
|
"""
|
|
21
21
|
im_bytes: Optional[bytes] = None
|
|
22
22
|
file_path: Optional[str] = None
|
|
23
23
|
url: Optional[str] = None
|
|
24
|
+
uid: Optional[str] = None
|
|
25
|
+
global_key: Optional[str] = None
|
|
24
26
|
arr: Optional[TypedArray[Literal['uint8']]] = None
|
|
27
|
+
|
|
28
|
+
model_config = ConfigDict(extra="forbid")
|
|
25
29
|
|
|
26
30
|
@classmethod
|
|
27
31
|
def from_2D_arr(cls, arr: Union[TypedArray[Literal['uint8']],
|
|
@@ -155,14 +159,14 @@ class RasterData(pydantic_compat.BaseModel, ABC):
|
|
|
155
159
|
"One of url, im_bytes, file_path, arr must not be None.")
|
|
156
160
|
return self.url
|
|
157
161
|
|
|
158
|
-
@
|
|
159
|
-
def validate_args(
|
|
160
|
-
file_path =
|
|
161
|
-
im_bytes =
|
|
162
|
-
url =
|
|
163
|
-
arr =
|
|
164
|
-
uid =
|
|
165
|
-
global_key =
|
|
162
|
+
@model_validator(mode="after")
|
|
163
|
+
def validate_args(self, values):
|
|
164
|
+
file_path = self.file_path
|
|
165
|
+
im_bytes = self.im_bytes
|
|
166
|
+
url = self.url
|
|
167
|
+
arr = self.arr
|
|
168
|
+
uid = self.uid
|
|
169
|
+
global_key = self.global_key
|
|
166
170
|
if uid == file_path == im_bytes == url == global_key == None and arr is None:
|
|
167
171
|
raise ValueError(
|
|
168
172
|
"One of `file_path`, `im_bytes`, `url`, `uid`, `global_key` or `arr` required."
|
|
@@ -175,8 +179,8 @@ class RasterData(pydantic_compat.BaseModel, ABC):
|
|
|
175
179
|
elif len(arr.shape) != 3:
|
|
176
180
|
raise ValueError(
|
|
177
181
|
"unsupported image format. Must be 3D ([H,W,C])."
|
|
178
|
-
f"Use {
|
|
179
|
-
return
|
|
182
|
+
f"Use {self.__name__}.from_2D_arr to construct from 2D")
|
|
183
|
+
return self
|
|
180
184
|
|
|
181
185
|
def __repr__(self) -> str:
|
|
182
186
|
symbol_or_none = lambda data: '...' if data is not None else None
|
|
@@ -185,12 +189,6 @@ class RasterData(pydantic_compat.BaseModel, ABC):
|
|
|
185
189
|
f"url={self.url}," \
|
|
186
190
|
f"arr={symbol_or_none(self.arr)})"
|
|
187
191
|
|
|
188
|
-
class Config:
|
|
189
|
-
# Required for sharing references
|
|
190
|
-
copy_on_model_validation = 'none'
|
|
191
|
-
# Required for discriminating between data types
|
|
192
|
-
extra = 'forbid'
|
|
193
|
-
|
|
194
192
|
|
|
195
193
|
class MaskData(RasterData):
|
|
196
194
|
"""Used to represent a segmentation Mask
|
|
@@ -4,7 +4,7 @@ import requests
|
|
|
4
4
|
from requests.exceptions import ConnectTimeout
|
|
5
5
|
from google.api_core import retry
|
|
6
6
|
|
|
7
|
-
from
|
|
7
|
+
from pydantic import ConfigDict, model_validator
|
|
8
8
|
from labelbox.exceptions import InternalServerError
|
|
9
9
|
from labelbox.typing_imports import Literal
|
|
10
10
|
from labelbox.utils import _NoCoercionMixin
|
|
@@ -26,6 +26,7 @@ class TextData(BaseData, _NoCoercionMixin):
|
|
|
26
26
|
file_path: Optional[str] = None
|
|
27
27
|
text: Optional[str] = None
|
|
28
28
|
url: Optional[str] = None
|
|
29
|
+
model_config = ConfigDict(extra="forbid")
|
|
29
30
|
|
|
30
31
|
@property
|
|
31
32
|
def value(self) -> str:
|
|
@@ -64,7 +65,7 @@ class TextData(BaseData, _NoCoercionMixin):
|
|
|
64
65
|
"""
|
|
65
66
|
response = requests.get(self.url)
|
|
66
67
|
if response.status_code in [500, 502, 503, 504]:
|
|
67
|
-
raise
|
|
68
|
+
raise InternalServerError(response.text)
|
|
68
69
|
response.raise_for_status()
|
|
69
70
|
return response.text
|
|
70
71
|
|
|
@@ -90,24 +91,20 @@ class TextData(BaseData, _NoCoercionMixin):
|
|
|
90
91
|
"One of url, im_bytes, file_path, numpy must not be None.")
|
|
91
92
|
return self.url
|
|
92
93
|
|
|
93
|
-
@
|
|
94
|
-
def validate_date(
|
|
95
|
-
file_path =
|
|
96
|
-
text =
|
|
97
|
-
url =
|
|
98
|
-
uid =
|
|
99
|
-
global_key =
|
|
94
|
+
@model_validator(mode="after")
|
|
95
|
+
def validate_date(self, values):
|
|
96
|
+
file_path = self.file_path
|
|
97
|
+
text = self.text
|
|
98
|
+
url = self.url
|
|
99
|
+
uid = self.uid
|
|
100
|
+
global_key = self.global_key
|
|
100
101
|
if uid == file_path == text == url == global_key == None:
|
|
101
102
|
raise ValueError(
|
|
102
103
|
"One of `file_path`, `text`, `uid`, `global_key` or `url` required."
|
|
103
104
|
)
|
|
104
|
-
return
|
|
105
|
+
return self
|
|
105
106
|
|
|
106
107
|
def __repr__(self) -> str:
|
|
107
108
|
return f"TextData(file_path={self.file_path}," \
|
|
108
109
|
f"text={self.text[:30] + '...' if self.text is not None else None}," \
|
|
109
110
|
f"url={self.url})"
|
|
110
|
-
|
|
111
|
-
class config:
|
|
112
|
-
# Required for discriminating between data types
|
|
113
|
-
extra = 'forbid'
|
|
@@ -12,11 +12,11 @@ from google.api_core import retry
|
|
|
12
12
|
from PIL import Image
|
|
13
13
|
from pyproj import Transformer
|
|
14
14
|
from pygeotile.point import Point as PygeoPoint
|
|
15
|
-
from labelbox import pydantic_compat
|
|
16
15
|
|
|
17
16
|
from labelbox.data.annotation_types import Rectangle, Point, Line, Polygon
|
|
18
17
|
from .base_data import BaseData
|
|
19
18
|
from .raster import RasterData
|
|
19
|
+
from pydantic import BaseModel, field_validator, model_validator, ConfigDict
|
|
20
20
|
|
|
21
21
|
VALID_LAT_RANGE = range(-90, 90)
|
|
22
22
|
VALID_LNG_RANGE = range(-180, 180)
|
|
@@ -40,7 +40,7 @@ class EPSG(Enum):
|
|
|
40
40
|
EPSG3857 = 3857
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
class TiledBounds(
|
|
43
|
+
class TiledBounds(BaseModel):
|
|
44
44
|
""" Bounds for a tiled image asset related to the relevant epsg.
|
|
45
45
|
|
|
46
46
|
Bounds should be Point objects.
|
|
@@ -54,7 +54,7 @@ class TiledBounds(pydantic_compat.BaseModel):
|
|
|
54
54
|
epsg: EPSG
|
|
55
55
|
bounds: List[Point]
|
|
56
56
|
|
|
57
|
-
@
|
|
57
|
+
@field_validator('bounds')
|
|
58
58
|
def validate_bounds_not_equal(cls, bounds):
|
|
59
59
|
first_bound = bounds[0]
|
|
60
60
|
second_bound = bounds[1]
|
|
@@ -66,10 +66,10 @@ class TiledBounds(pydantic_compat.BaseModel):
|
|
|
66
66
|
return bounds
|
|
67
67
|
|
|
68
68
|
#validate bounds are within lat,lng range if they are EPSG4326
|
|
69
|
-
@
|
|
70
|
-
def validate_bounds_lat_lng(
|
|
71
|
-
epsg =
|
|
72
|
-
bounds =
|
|
69
|
+
@model_validator(mode="after")
|
|
70
|
+
def validate_bounds_lat_lng(self):
|
|
71
|
+
epsg = self.epsg
|
|
72
|
+
bounds = self.bounds
|
|
73
73
|
|
|
74
74
|
if epsg == EPSG.EPSG4326:
|
|
75
75
|
for bound in bounds:
|
|
@@ -79,10 +79,10 @@ class TiledBounds(pydantic_compat.BaseModel):
|
|
|
79
79
|
raise ValueError(f"Invalid lat/lng bounds. Found {bounds}. "
|
|
80
80
|
f"lat must be in {VALID_LAT_RANGE}. "
|
|
81
81
|
f"lng must be in {VALID_LNG_RANGE}.")
|
|
82
|
-
return
|
|
82
|
+
return self
|
|
83
83
|
|
|
84
84
|
|
|
85
|
-
class TileLayer(
|
|
85
|
+
class TileLayer(BaseModel):
|
|
86
86
|
""" Url that contains the tile layer. Must be in the format:
|
|
87
87
|
|
|
88
88
|
https://c.tile.openstreetmap.org/{z}/{x}/{y}.png
|
|
@@ -98,7 +98,7 @@ class TileLayer(pydantic_compat.BaseModel):
|
|
|
98
98
|
def asdict(self) -> Dict[str, str]:
|
|
99
99
|
return {"tileLayerUrl": self.url, "name": self.name}
|
|
100
100
|
|
|
101
|
-
@
|
|
101
|
+
@field_validator('url')
|
|
102
102
|
def validate_url(cls, url):
|
|
103
103
|
xyz_format = "/{z}/{x}/{y}"
|
|
104
104
|
if xyz_format not in url:
|
|
@@ -343,7 +343,7 @@ class TiledImageData(BaseData):
|
|
|
343
343
|
f"Max allowed tiles are {max_tiles}"
|
|
344
344
|
f"Increase max tiles or reduce zoom level.")
|
|
345
345
|
|
|
346
|
-
@
|
|
346
|
+
@field_validator('zoom_levels')
|
|
347
347
|
def validate_zoom_levels(cls, zoom_levels):
|
|
348
348
|
if zoom_levels[0] > zoom_levels[1]:
|
|
349
349
|
raise ValueError(
|
|
@@ -352,15 +352,12 @@ class TiledImageData(BaseData):
|
|
|
352
352
|
return zoom_levels
|
|
353
353
|
|
|
354
354
|
|
|
355
|
-
class EPSGTransformer(
|
|
355
|
+
class EPSGTransformer(BaseModel):
|
|
356
356
|
"""Transformer class between different EPSG's. Useful when wanting to project
|
|
357
357
|
in different formats.
|
|
358
358
|
"""
|
|
359
|
-
|
|
360
|
-
class Config:
|
|
361
|
-
arbitrary_types_allowed = True
|
|
362
|
-
|
|
363
359
|
transformer: Any
|
|
360
|
+
model_config = ConfigDict(arbitrary_types_allowed = True)
|
|
364
361
|
|
|
365
362
|
@staticmethod
|
|
366
363
|
def _is_simple(epsg: EPSG) -> bool:
|
|
@@ -12,7 +12,7 @@ from google.api_core import retry
|
|
|
12
12
|
from .base_data import BaseData
|
|
13
13
|
from ..types import TypedArray
|
|
14
14
|
|
|
15
|
-
from
|
|
15
|
+
from pydantic import ConfigDict, model_validator
|
|
16
16
|
|
|
17
17
|
logger = logging.getLogger(__name__)
|
|
18
18
|
|
|
@@ -24,6 +24,8 @@ class VideoData(BaseData):
|
|
|
24
24
|
file_path: Optional[str] = None
|
|
25
25
|
url: Optional[str] = None
|
|
26
26
|
frames: Optional[Dict[int, TypedArray[Literal['uint8']]]] = None
|
|
27
|
+
# Required for discriminating between data types
|
|
28
|
+
model_config = ConfigDict(extra = "forbid")
|
|
27
29
|
|
|
28
30
|
def load_frames(self, overwrite: bool = False) -> None:
|
|
29
31
|
"""
|
|
@@ -148,25 +150,21 @@ class VideoData(BaseData):
|
|
|
148
150
|
out.release()
|
|
149
151
|
return file_path
|
|
150
152
|
|
|
151
|
-
@
|
|
152
|
-
def validate_data(
|
|
153
|
-
file_path =
|
|
154
|
-
url =
|
|
155
|
-
frames =
|
|
156
|
-
uid =
|
|
157
|
-
global_key =
|
|
153
|
+
@model_validator(mode="after")
|
|
154
|
+
def validate_data(self):
|
|
155
|
+
file_path = self.file_path
|
|
156
|
+
url = self.url
|
|
157
|
+
frames = self.frames
|
|
158
|
+
uid = self.uid
|
|
159
|
+
global_key = self.global_key
|
|
158
160
|
|
|
159
161
|
if uid == file_path == frames == url == global_key == None:
|
|
160
162
|
raise ValueError(
|
|
161
163
|
"One of `file_path`, `frames`, `uid`, `global_key` or `url` required."
|
|
162
164
|
)
|
|
163
|
-
return
|
|
165
|
+
return self
|
|
164
166
|
|
|
165
167
|
def __repr__(self) -> str:
|
|
166
168
|
return f"VideoData(file_path={self.file_path}," \
|
|
167
169
|
f"frames={'...' if self.frames is not None else None}," \
|
|
168
170
|
f"url={self.url})"
|
|
169
|
-
|
|
170
|
-
class Config:
|
|
171
|
-
# Required for discriminating between data types
|
|
172
|
-
extra = 'forbid'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
from pydantic import BaseModel, model_validator, model_serializer
|
|
3
|
+
from .types import Cuid
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FeatureSchema(BaseModel):
|
|
7
|
+
"""
|
|
8
|
+
Class that represents a feature schema.
|
|
9
|
+
Could be a annotation, a subclass, or an option.
|
|
10
|
+
Schema ids might not be known when constructing these objects so both a name and schema id are valid.
|
|
11
|
+
"""
|
|
12
|
+
name: Optional[str] = None
|
|
13
|
+
feature_schema_id: Optional[Cuid] = None
|
|
14
|
+
|
|
15
|
+
@model_validator(mode="after")
|
|
16
|
+
def must_set_one(self):
|
|
17
|
+
if self.feature_schema_id is None and self.name is None:
|
|
18
|
+
raise ValueError(
|
|
19
|
+
"Must set either feature_schema_id or name for all feature schemas"
|
|
20
|
+
)
|
|
21
|
+
return self
|