scale-nucleus 0.17.5__tar.gz → 0.17.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/PKG-INFO +1 -1
  2. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/dataset.py +45 -2
  3. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/pyproject.toml +1 -1
  4. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/LICENSE +0 -0
  5. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/README.md +0 -0
  6. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/client.py +0 -0
  7. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/datasets.py +0 -0
  8. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/helpers/__init__.py +0 -0
  9. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/helpers/nucleus_url.py +0 -0
  10. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/helpers/web_helper.py +0 -0
  11. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/install_completion.py +0 -0
  12. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/jobs.py +0 -0
  13. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/models.py +0 -0
  14. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/nu.py +0 -0
  15. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/reference.py +0 -0
  16. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/slices.py +0 -0
  17. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/cli/tests.py +0 -0
  18. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/__init__.py +0 -0
  19. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/annotation.py +0 -0
  20. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/annotation_uploader.py +0 -0
  21. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/async_job.py +0 -0
  22. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/async_utils.py +0 -0
  23. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/autocurate.py +0 -0
  24. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/camera_params.py +0 -0
  25. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/chip_utils.py +0 -0
  26. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/connection.py +0 -0
  27. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/constants.py +0 -0
  28. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/data_transfer_object/__init__.py +0 -0
  29. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/data_transfer_object/dataset_details.py +0 -0
  30. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/data_transfer_object/dataset_info.py +0 -0
  31. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/data_transfer_object/dataset_size.py +0 -0
  32. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/data_transfer_object/job_status.py +0 -0
  33. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/data_transfer_object/scenes_list.py +0 -0
  34. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/dataset_item.py +0 -0
  35. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/dataset_item_uploader.py +0 -0
  36. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/deprecation_warning.py +0 -0
  37. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/embedding_index.py +0 -0
  38. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/errors.py +0 -0
  39. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/evaluation_match.py +0 -0
  40. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/job.py +0 -0
  41. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/logger.py +0 -0
  42. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metadata_manager.py +0 -0
  43. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/__init__.py +0 -0
  44. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/base.py +0 -0
  45. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/categorization_metrics.py +0 -0
  46. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/cuboid_metrics.py +0 -0
  47. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/cuboid_utils.py +0 -0
  48. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/custom_types.py +0 -0
  49. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/errors.py +0 -0
  50. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/filtering.py +0 -0
  51. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/filters.py +0 -0
  52. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/metric_utils.py +0 -0
  53. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/polygon_metrics.py +0 -0
  54. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/polygon_utils.py +0 -0
  55. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/segmentation_loader.py +0 -0
  56. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/segmentation_metrics.py +0 -0
  57. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/segmentation_to_poly_metrics.py +0 -0
  58. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/metrics/segmentation_utils.py +0 -0
  59. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/model.py +0 -0
  60. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/model_run.py +0 -0
  61. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/package_not_installed.py +0 -0
  62. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/payload_constructor.py +0 -0
  63. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/prediction.py +0 -0
  64. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/pydantic_base.py +0 -0
  65. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/quaternion.py +0 -0
  66. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/retry_strategy.py +0 -0
  67. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/scene.py +0 -0
  68. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/slice.py +0 -0
  69. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/test_launch_integration.py +0 -0
  70. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/track.py +0 -0
  71. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/upload_response.py +0 -0
  72. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/url_utils.py +0 -0
  73. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/utils.py +0 -0
  74. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/__init__.py +0 -0
  75. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/client.py +0 -0
  76. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/constants.py +0 -0
  77. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/data_transfer_objects/__init__.py +0 -0
  78. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/data_transfer_objects/eval_function.py +0 -0
  79. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/data_transfer_objects/scenario_test.py +0 -0
  80. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/data_transfer_objects/scenario_test_evaluations.py +0 -0
  81. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/data_transfer_objects/scenario_test_metric.py +0 -0
  82. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/errors.py +0 -0
  83. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/eval_functions/__init__.py +0 -0
  84. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/eval_functions/available_eval_functions.py +0 -0
  85. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/eval_functions/base_eval_function.py +0 -0
  86. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/eval_functions/config_classes/__init__.py +0 -0
  87. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/eval_functions/config_classes/segmentation.py +0 -0
  88. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/scenario_test.py +0 -0
  89. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/scenario_test_evaluation.py +0 -0
  90. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/scenario_test_metric.py +0 -0
  91. {scale_nucleus-0.17.5 → scale_nucleus-0.17.6}/nucleus/validate/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scale-nucleus
3
- Version: 0.17.5
3
+ Version: 0.17.6
4
4
  Summary: The official Python client library for Nucleus, the Data Platform for AI
5
5
  Home-page: https://scale.com/nucleus
6
6
  License: MIT
@@ -1449,6 +1449,49 @@ class Dataset:
1449
1449
  )
1450
1450
  return convert_export_payload(api_payload[EXPORTED_ROWS])
1451
1451
 
1452
+ def scene_and_annotation_generator(self, page_size=10):
1453
+ """Provides a generator of all DatasetItems and Annotations in the dataset grouped by scene.
1454
+
1455
+
1456
+ Returns:
1457
+ Generator where each element is a nested dict (representing a JSON) structured in the following way:
1458
+
1459
+ Iterable[{
1460
+ "file_location": str,
1461
+ "metadata": Dict[str, Any],
1462
+ "annotations": {
1463
+ "{trackId}": {
1464
+ "label": str,
1465
+ "name": str,
1466
+ "frames": List[{
1467
+ "left": int,
1468
+ "top": int,
1469
+ "width": int,
1470
+ "height": int,
1471
+ "key": str, # frame key
1472
+ "metadata": Dict[str, Any]
1473
+ }]
1474
+ }
1475
+ }
1476
+ }]
1477
+
1478
+ This is similar to how the Scale API returns task data
1479
+ """
1480
+
1481
+ if page_size > 30:
1482
+ raise ValueError("Page size must be less than or equal to 30")
1483
+
1484
+ endpoint_name = "exportForTrainingByScene"
1485
+ json_generator = paginate_generator(
1486
+ client=self._client,
1487
+ endpoint=f"dataset/{self.id}/{endpoint_name}",
1488
+ result_key=EXPORT_FOR_TRAINING_KEY,
1489
+ page_size=page_size,
1490
+ )
1491
+
1492
+ for data in json_generator:
1493
+ yield data
1494
+
1452
1495
  def items_and_annotation_generator(
1453
1496
  self,
1454
1497
  query: Optional[str] = None,
@@ -2310,9 +2353,9 @@ class Dataset:
2310
2353
  pointcloud_ref_id: str,
2311
2354
  predictions_s3_path: str,
2312
2355
  ):
2313
- """Upload Lidar Semantic Segmentation predictions for a given pointcloud.
2356
+ """Upload Lidar Semantic Segmentation predictions for a given point-cloud.
2314
2357
 
2315
- Assuming a pointcloud with only 4 points (three labeled as Car, one labeled as Person),
2358
+ Assuming a point-cloud with only 4 points (three labeled as Car, one labeled as Person),
2316
2359
  the contents of the predictions s3 object should be formatted as such:
2317
2360
 
2318
2361
  .. code-block:: json
@@ -25,7 +25,7 @@ ignore = ["E501", "E741", "E731", "F401"] # Easy ignore for getting it running
25
25
 
26
26
  [tool.poetry]
27
27
  name = "scale-nucleus"
28
- version = "0.17.5"
28
+ version = "0.17.6"
29
29
  description = "The official Python client library for Nucleus, the Data Platform for AI"
30
30
  license = "MIT"
31
31
  authors = ["Scale AI Nucleus Team <nucleusapi@scaleapi.com>"]
File without changes
File without changes
File without changes