x4d-devkit 0.65.0__tar.gz → 0.66.0rc1__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 (189) hide show
  1. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/PKG-INFO +1 -1
  2. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/pyproject.toml +1 -1
  3. x4d_devkit-0.66.0rc1/tests/test_point_prediction.py +280 -0
  4. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_sdk_api.py +1 -1
  5. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/__init__.py +2 -0
  6. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/client.py +2 -0
  7. x4d_devkit-0.66.0rc1/x4d_devkit/client/point_prediction.py +285 -0
  8. x4d_devkit-0.66.0rc1/x4d_devkit/point_prediction.py +324 -0
  9. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit.egg-info/PKG-INFO +1 -1
  10. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit.egg-info/SOURCES.txt +3 -0
  11. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/LICENSE +0 -0
  12. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/README.md +0 -0
  13. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/setup.cfg +0 -0
  14. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_accounts.py +0 -0
  15. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_annotation_contract.py +0 -0
  16. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_annotation_document_hash.py +0 -0
  17. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_annotation_reference.py +0 -0
  18. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_assets_client.py +0 -0
  19. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_boundary.py +0 -0
  20. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_box.py +0 -0
  21. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_build_info.py +0 -0
  22. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_category_audit.py +0 -0
  23. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_clean_basemap.py +0 -0
  24. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_clean_basemap_client.py +0 -0
  25. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_cli_auth.py +0 -0
  26. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_client_json_contract.py +0 -0
  27. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_client_projects.py +0 -0
  28. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_clip_archives.py +0 -0
  29. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_contract_validation.py +0 -0
  30. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_contracts.py +0 -0
  31. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_coordinate_frames.py +0 -0
  32. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_current_state.py +0 -0
  33. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_current_state_identity_consumers_example.py +0 -0
  34. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_dataset_contract.py +0 -0
  35. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_dataset_identity.py +0 -0
  36. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_detection_eval.py +0 -0
  37. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_evaluate.py +0 -0
  38. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_export_bundle.py +0 -0
  39. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_clip.py +0 -0
  40. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_conditional_rules.py +0 -0
  41. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_enum_set.py +0 -0
  42. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_export.py +0 -0
  43. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_external_predictions.py +0 -0
  44. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_geometry.py +0 -0
  45. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_groups.py +0 -0
  46. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_polygon.py +0 -0
  47. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_preannotation.py +0 -0
  48. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_reference.py +0 -0
  49. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_review.py +0 -0
  50. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_schema_migration.py +0 -0
  51. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_schema_registry_client.py +0 -0
  52. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_schema_upgrade.py +0 -0
  53. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_source.py +0 -0
  54. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_image_work_session.py +0 -0
  55. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_inference_input.py +0 -0
  56. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_inference_schemas.py +0 -0
  57. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_inference_service.py +0 -0
  58. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_label_schemas.py +0 -0
  59. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_lidar_materialization.py +0 -0
  60. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_loader.py +0 -0
  61. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_matching.py +0 -0
  62. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_metrics.py +0 -0
  63. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_models.py +0 -0
  64. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_parse_equivalence.py +0 -0
  65. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_platform_pose.py +0 -0
  66. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_preannotation_client.py +0 -0
  67. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_project_discovery.py +0 -0
  68. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_reconstruction_client.py +0 -0
  69. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_release_gate.py +0 -0
  70. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_roadmark_preview.py +0 -0
  71. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_semantic_scene_authoring.py +0 -0
  72. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_semantic_scene_client.py +0 -0
  73. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_semantic_scene_contract.py +0 -0
  74. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_semantic_scene_independent.py +0 -0
  75. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_semantic_scene_native_clip.py +0 -0
  76. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_source_attributes.py +0 -0
  77. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_source_content.py +0 -0
  78. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_time_contract.py +0 -0
  79. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_token.py +0 -0
  80. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_tracking_eval.py +0 -0
  81. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_training_identity.py +0 -0
  82. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_transform.py +0 -0
  83. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_transform_chain.py +0 -0
  84. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_validation.py +0 -0
  85. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_vector_map.py +0 -0
  86. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_vector_map_geometry.py +0 -0
  87. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_vector_map_session.py +0 -0
  88. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_work_facts.py +0 -0
  89. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_work_items.py +0 -0
  90. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_work_session.py +0 -0
  91. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/tests/test_work_session_validation_reuse.py +0 -0
  92. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/__init__.py +0 -0
  93. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/_image_contract.py +0 -0
  94. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/accounts.py +0 -0
  95. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/annotation_contract.py +0 -0
  96. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/annotation_reference.py +0 -0
  97. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/audit.py +0 -0
  98. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/build_info.py +0 -0
  99. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/clean_basemap.py +0 -0
  100. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/cli.py +0 -0
  101. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/_origin.py +0 -0
  102. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/accounts.py +0 -0
  103. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/annotation_reference.py +0 -0
  104. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/assets.py +0 -0
  105. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/bags.py +0 -0
  106. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/capabilities.py +0 -0
  107. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/checkpoints.py +0 -0
  108. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/clean_basemap.py +0 -0
  109. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/clip_work_sessions.py +0 -0
  110. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/clips.py +0 -0
  111. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/dataset_identity.py +0 -0
  112. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/image_clips.py +0 -0
  113. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/image_exports.py +0 -0
  114. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/image_preannotations.py +0 -0
  115. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/image_review.py +0 -0
  116. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/image_schemas.py +0 -0
  117. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/image_work_sessions.py +0 -0
  118. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/label_schemas.py +0 -0
  119. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/preannotation.py +0 -0
  120. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/projects.py +0 -0
  121. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/reconstruction.py +0 -0
  122. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/semantic_scene.py +0 -0
  123. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/semantic_scene_authoring.py +0 -0
  124. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/services.py +0 -0
  125. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/test_sets.py +0 -0
  126. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/work_facts.py +0 -0
  127. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/client/work_items.py +0 -0
  128. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/consumer_identity.py +0 -0
  129. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/contracts.py +0 -0
  130. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/coordinate_contract.py +0 -0
  131. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/core/__init__.py +0 -0
  132. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/core/loader.py +0 -0
  133. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/core/models.py +0 -0
  134. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/core/token.py +0 -0
  135. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/core/transform.py +0 -0
  136. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/current_state.py +0 -0
  137. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/dataset_contract.py +0 -0
  138. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/dataset_identity.py +0 -0
  139. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/__init__.py +0 -0
  140. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/api.py +0 -0
  141. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/box.py +0 -0
  142. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/detection.py +0 -0
  143. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/matching.py +0 -0
  144. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/metrics.py +0 -0
  145. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/eval/tracking.py +0 -0
  146. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/export_bundle.py +0 -0
  147. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_clip.py +0 -0
  148. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_export.py +0 -0
  149. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_geometry.py +0 -0
  150. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_groups.py +0 -0
  151. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_preannotation.py +0 -0
  152. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_reference.py +0 -0
  153. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_review.py +0 -0
  154. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_schema.py +0 -0
  155. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_schema_migration.py +0 -0
  156. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_schema_upgrade.py +0 -0
  157. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_source.py +0 -0
  158. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/image_work_session.py +0 -0
  159. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/inference/__init__.py +0 -0
  160. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/inference/input.py +0 -0
  161. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/inference/models.py +0 -0
  162. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/inference/schemas.py +0 -0
  163. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/inference/service.py +0 -0
  164. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/inference/tasks.py +0 -0
  165. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/json_contract.py +0 -0
  166. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/label_schema.py +0 -0
  167. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/lidar_materialization.py +0 -0
  168. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/materialize.py +0 -0
  169. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/project_discovery.py +0 -0
  170. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/roadmark_preview.py +0 -0
  171. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/semantic_scene_authoring.py +0 -0
  172. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/semantic_scene_contract.py +0 -0
  173. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/source_content.py +0 -0
  174. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/time_contract.py +0 -0
  175. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/training_identity.py +0 -0
  176. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/validation/__init__.py +0 -0
  177. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/validation/contract.py +0 -0
  178. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/validation/platform_pose.py +0 -0
  179. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/validation/report.py +0 -0
  180. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/validation/validator.py +0 -0
  181. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/vector_map.py +0 -0
  182. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/vector_map_geometry.py +0 -0
  183. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/work_facts.py +0 -0
  184. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/work_items.py +0 -0
  185. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit/work_session.py +0 -0
  186. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit.egg-info/dependency_links.txt +0 -0
  187. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit.egg-info/entry_points.txt +0 -0
  188. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit.egg-info/requires.txt +0 -0
  189. {x4d_devkit-0.65.0 → x4d_devkit-0.66.0rc1}/x4d_devkit.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: x4d-devkit
3
- Version: 0.65.0
3
+ Version: 0.66.0rc1
4
4
  Summary: Official X-4D external SDK and CLI for datasets, platform APIs, training bridges, and automation
5
5
  Author: windzu
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "x4d-devkit"
7
- version = "0.65.0"
7
+ version = "0.66.0rc1"
8
8
  description = "Official X-4D external SDK and CLI for datasets, platform APIs, training bridges, and automation"
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -0,0 +1,280 @@
1
+ import copy
2
+
3
+ import httpx
4
+ import numpy as np
5
+ import pytest
6
+
7
+ from tests.test_clean_basemap import fixture
8
+ from x4d_devkit import X4DClient
9
+ from x4d_devkit.client.point_prediction import (
10
+ parse_point_prediction_evaluation,
11
+ parse_point_prediction_state,
12
+ )
13
+ from x4d_devkit.point_prediction import (
14
+ POINT_PREDICTION_CONTRACT_VERSION,
15
+ POINT_PREDICTION_EVALUATION_CONTRACT_VERSION,
16
+ POINT_PREDICTION_OPERATION,
17
+ UNASSESSED_CLASS,
18
+ compute_point_prediction_revision,
19
+ decode_point_prediction_chunk,
20
+ encode_point_prediction_chunk,
21
+ parse_point_prediction_manifest,
22
+ point_prediction_asset_paths,
23
+ point_prediction_descriptor,
24
+ prefill_codes,
25
+ )
26
+
27
+
28
+ def prediction_fixture():
29
+ basemap, _, _ = fixture()
30
+ chunk = basemap["chunks"][0]
31
+ count = chunk["point_count"]
32
+ raw = np.array([10, 15, UNASSESSED_CLASS, 12, 10][:count], dtype=np.uint8)
33
+ raw = np.resize(raw, count)
34
+ conf = np.where(raw == UNASSESSED_CLASS, 0, np.resize([250, 120, 0, 240, 200], count))
35
+ agree = np.where(raw == UNASSESSED_CLASS, 0, 255)
36
+ payload = encode_point_prediction_chunk(
37
+ geometry_raw_sha256=chunk["geometry"]["raw_sha256"],
38
+ raw_classes=raw,
39
+ confidence=conf.astype(np.uint8),
40
+ agreement=agree.astype(np.uint8),
41
+ declared_raw_classes=[10, 12, 15],
42
+ )
43
+ manifest = {
44
+ "contract_version": POINT_PREDICTION_CONTRACT_VERSION,
45
+ "clip_id": basemap["clip_id"],
46
+ "prediction_revision": "",
47
+ "basemap_revision": basemap["basemap_revision"],
48
+ "label_schema_fingerprint": "sha256:" + "c" * 64,
49
+ "producer": {
50
+ "id": "point_semantic_prediction",
51
+ "version": "0.1.0",
52
+ "model": {
53
+ "id": "ptv3-nuscenes-semseg",
54
+ "weights_sha256": "sha256:" + "d" * 64,
55
+ "source": "https://huggingface.co/Pointcept/PointTransformerV3",
56
+ },
57
+ "license": "evaluation only; nuScenes non-commercial",
58
+ "profile": {"intensity_scale": {"lidar": 100.0}},
59
+ },
60
+ "classes": [
61
+ {"raw": 10, "name": "driveable_surface", "category_code": 3},
62
+ {"raw": 12, "name": "sidewalk", "category_code": 4},
63
+ {"raw": 15, "name": "vegetation", "category_code": None},
64
+ ],
65
+ "point_count": basemap["point_count"],
66
+ "chunks": [
67
+ {
68
+ "ordinal": 0,
69
+ "point_count": count,
70
+ "geometry_raw_sha256": chunk["geometry"]["raw_sha256"],
71
+ "payload": point_prediction_descriptor(payload),
72
+ }
73
+ ],
74
+ "metrics": {"sweeps": 1},
75
+ }
76
+ manifest["prediction_revision"] = compute_point_prediction_revision(manifest)
77
+ return basemap, manifest, payload, raw
78
+
79
+
80
+ def test_manifest_binds_basemap_and_chunk_roundtrips():
81
+ basemap, manifest, payload, raw = prediction_fixture()
82
+ parsed = parse_point_prediction_manifest(manifest, basemap=basemap)
83
+ records = decode_point_prediction_chunk(
84
+ payload.payload, manifest=parsed, chunk_ordinal=0
85
+ )
86
+ assert records["raw_class"].tolist() == raw.tolist()
87
+ assert point_prediction_asset_paths(parsed) == {
88
+ manifest["chunks"][0]["payload"]["path"]
89
+ }
90
+ lookup = parsed.category_codes()
91
+ assert lookup[10] == 3 and lookup[15] == 0 and lookup[UNASSESSED_CLASS] == 0
92
+
93
+
94
+ def test_prefill_selects_classes_above_thresholds_and_skips_unmapped():
95
+ _, manifest, payload, raw = prediction_fixture()
96
+ parsed = parse_point_prediction_manifest(manifest)
97
+ records = decode_point_prediction_chunk(
98
+ payload.payload, manifest=parsed, chunk_ordinal=0
99
+ )
100
+ codes = prefill_codes(
101
+ records, parsed, raw_classes=[10, 12, 15], min_confidence=0.9
102
+ )
103
+ expected = [
104
+ 3 if r == 10 and c >= 230 else 4 if r == 12 and c >= 230 else 0
105
+ for r, c in zip(raw, records["confidence"])
106
+ ]
107
+ assert codes.tolist() == expected
108
+ with pytest.raises(ValueError):
109
+ prefill_codes(records, parsed, raw_classes=[10], min_confidence=1.5)
110
+
111
+
112
+ @pytest.mark.parametrize(
113
+ "edit",
114
+ [
115
+ lambda m: m.update(contract_version="x4d-point-semantic-prediction-v0"),
116
+ lambda m: m["classes"].append({"raw": 3, "name": "car", "category_code": 1}),
117
+ lambda m: m["classes"][0].update(raw=UNASSESSED_CLASS),
118
+ lambda m: m["chunks"][0].update(point_count=m["chunks"][0]["point_count"] + 1),
119
+ lambda m: m["chunks"][0]["payload"].update(path="elsewhere.zst"),
120
+ lambda m: m.update(metrics={"sweeps": 2}),
121
+ lambda m: m.update(extra=True),
122
+ ],
123
+ )
124
+ def test_manifest_rejects_noncanonical_or_unbound_shapes(edit):
125
+ _, manifest, _, _ = prediction_fixture()
126
+ edit(manifest)
127
+ with pytest.raises(ValueError):
128
+ parse_point_prediction_manifest(manifest)
129
+
130
+
131
+ def test_binding_rejects_a_different_basemap():
132
+ basemap, manifest, _, _ = prediction_fixture()
133
+ other = copy.deepcopy(manifest)
134
+ other["basemap_revision"] = "sha256:" + "f" * 64
135
+ other["prediction_revision"] = compute_point_prediction_revision(other)
136
+ with pytest.raises(ValueError, match="different clean basemap"):
137
+ parse_point_prediction_manifest(other, basemap=basemap)
138
+
139
+
140
+ def test_chunk_codec_rejects_undeclared_class_and_unassessed_confidence():
141
+ basemap, manifest, _, raw = prediction_fixture()
142
+ binding = basemap["chunks"][0]["geometry"]["raw_sha256"]
143
+ ones = np.ones(len(raw), dtype=np.uint8)
144
+ with pytest.raises(ValueError, match="undeclared"):
145
+ encode_point_prediction_chunk(
146
+ geometry_raw_sha256=binding,
147
+ raw_classes=np.full(len(raw), 3, np.uint8),
148
+ confidence=ones,
149
+ agreement=ones,
150
+ declared_raw_classes=[10],
151
+ )
152
+ with pytest.raises(ValueError, match="unassessed"):
153
+ encode_point_prediction_chunk(
154
+ geometry_raw_sha256=binding,
155
+ raw_classes=np.full(len(raw), UNASSESSED_CLASS, np.uint8),
156
+ confidence=ones,
157
+ agreement=ones,
158
+ )
159
+ _, manifest, payload, _ = prediction_fixture()
160
+ other = copy.deepcopy(manifest)
161
+ other["chunks"][0]["geometry_raw_sha256"] = "sha256:" + "0" * 64
162
+ other["prediction_revision"] = compute_point_prediction_revision(other)
163
+ with pytest.raises(ValueError):
164
+ decode_point_prediction_chunk(
165
+ payload.payload,
166
+ manifest=parse_point_prediction_manifest(other),
167
+ chunk_ordinal=0,
168
+ )
169
+
170
+
171
+ def state(source, **changes):
172
+ clip = source["clip_id"]
173
+ value = {
174
+ "operation": POINT_PREDICTION_OPERATION,
175
+ "project_id": 7,
176
+ "clip_id": clip,
177
+ "basemap_revision": source["basemap_revision"],
178
+ "status": "completed",
179
+ "task_id": "task-1",
180
+ "progress": 100,
181
+ "stage": "published",
182
+ "error": None,
183
+ "current": True,
184
+ "manifest": source,
185
+ "asset_urls": {
186
+ path: f"/api/v1/files/clips/{clip}/{path}"
187
+ for path in point_prediction_asset_paths(source)
188
+ },
189
+ }
190
+ value.update(changes)
191
+ return value
192
+
193
+
194
+ def test_typed_client_reads_state_and_verified_chunk():
195
+ _, manifest, payload, raw = prediction_fixture()
196
+ current = state(manifest)
197
+ calls = []
198
+
199
+ def handler(request):
200
+ calls.append((request.method, request.url.path))
201
+ if "/files/" in request.url.path:
202
+ return httpx.Response(
203
+ 200,
204
+ content=payload.payload,
205
+ headers={"content-type": "application/octet-stream"},
206
+ )
207
+ return httpx.Response(200, json=current)
208
+
209
+ with X4DClient(api_url="http://platform", token="test") as client:
210
+ client._http.close()
211
+ client._http = httpx.Client(
212
+ base_url="http://platform", transport=httpx.MockTransport(handler)
213
+ )
214
+ result = client.point_predictions.get_current(
215
+ project_id=7, clip_id=manifest["clip_id"]
216
+ )
217
+ client.point_predictions.prepare(project_id=7, clip_id=manifest["clip_id"])
218
+ records = client.point_predictions.fetch_chunk(result, chunk_ordinal=0)
219
+ assert records["raw_class"].tolist() == raw.tolist()
220
+ assert calls[0] == ("GET", "/api/v1/semantic-scene/point-predictions/current")
221
+ assert calls[1] == ("POST", "/api/v1/semantic-scene/point-predictions")
222
+
223
+
224
+ @pytest.mark.parametrize(
225
+ "changes",
226
+ [
227
+ {"current": False},
228
+ {"status": "running"},
229
+ {"basemap_revision": "sha256:" + "9" * 64},
230
+ {"asset_urls": {}},
231
+ {"status": "failed", "current": False, "manifest": None, "asset_urls": {}},
232
+ ],
233
+ )
234
+ def test_state_rejects_inconsistent_currentness(changes):
235
+ _, manifest, _, _ = prediction_fixture()
236
+ with pytest.raises(ValueError):
237
+ parse_point_prediction_state(
238
+ state(manifest, **changes), api_url="http://platform", project_id=7
239
+ )
240
+
241
+
242
+ def test_unavailable_and_failed_states_have_no_resource():
243
+ _, manifest, _, _ = prediction_fixture()
244
+ for status, error in (
245
+ ("unavailable", None),
246
+ (
247
+ "failed",
248
+ {"code": "x", "message": "m", "retryable": True, "details": {}},
249
+ ),
250
+ ):
251
+ parsed = parse_point_prediction_state(
252
+ state(
253
+ manifest,
254
+ status=status,
255
+ error=error,
256
+ current=False,
257
+ manifest=None,
258
+ asset_urls={},
259
+ progress=0,
260
+ task_id=None,
261
+ ),
262
+ api_url="http://platform",
263
+ project_id=7,
264
+ )
265
+ assert parsed.manifest is None and parsed.status == status
266
+
267
+
268
+ def test_evaluation_report_binding():
269
+ report = {
270
+ "contract_version": POINT_PREDICTION_EVALUATION_CONTRACT_VERSION,
271
+ "clip_id": "clip-a",
272
+ "prediction_revision": "sha256:" + "1" * 64,
273
+ "semantic_scene_revision": None,
274
+ "labeled_points": 0,
275
+ "classes": [],
276
+ "confidence_bins": [],
277
+ }
278
+ assert parse_point_prediction_evaluation(report, clip_id="clip-a") == report
279
+ with pytest.raises(ValueError):
280
+ parse_point_prediction_evaluation(report, clip_id="clip-b")
@@ -11,7 +11,7 @@ from x4d_devkit.eval.matching import MetricData
11
11
 
12
12
 
13
13
  def test_package_version_is_current_release():
14
- assert x4d_devkit.__version__ == "0.65.0"
14
+ assert x4d_devkit.__version__ == "0.66.0rc1"
15
15
 
16
16
 
17
17
  def test_loader_exposes_and_enforces_only_current_schema(tmp_path):
@@ -1,4 +1,5 @@
1
1
  from x4d_devkit.client.clean_basemap import CleanBasemapState
2
+ from x4d_devkit.client.point_prediction import PointPredictionState
2
3
  from x4d_devkit.client.assets import AssetsAPI, PlatformAsset, PlatformAssetReference
3
4
  from x4d_devkit.client.checkpoints import CheckpointsAPI
4
5
  from x4d_devkit.client.bags import BagsAPI
@@ -63,6 +64,7 @@ __all__ = [
63
64
  "ImageWorkSessionsAPI",
64
65
  "ImageExportsAPI",
65
66
  "CleanBasemapState",
67
+ "PointPredictionState",
66
68
  "AssetsAPI",
67
69
  "BagsAPI",
68
70
  "CapabilitiesAPI",
@@ -34,6 +34,7 @@ from x4d_devkit.client.semantic_scene_authoring import (
34
34
  SemanticSceneAuthoringWorkSessionsAPI,
35
35
  )
36
36
  from x4d_devkit.client.projects import ProjectsAPI
37
+ from x4d_devkit.client.point_prediction import PointPredictionsAPI
37
38
  from x4d_devkit.client.reconstruction import ReconstructionAPI
38
39
  from x4d_devkit.client.services import ServicesAPI
39
40
  from x4d_devkit.client.test_sets import TestSetsAPI
@@ -113,6 +114,7 @@ class X4DClient:
113
114
  self.dataset_identity = DatasetIdentityAPI(self)
114
115
  self.projects = ProjectsAPI(self)
115
116
  self.reconstruction = ReconstructionAPI(self)
117
+ self.point_predictions = PointPredictionsAPI(self)
116
118
  self.clips = ClipsAPI(self)
117
119
  self.image_clips = ImageClipsAPI(self)
118
120
  self.image_work_sessions = ImageWorkSessionsAPI(self)
@@ -0,0 +1,285 @@
1
+ """Typed discovery, preparation and reads of model point predictions (X-4D #1076)."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import copy
6
+ from dataclasses import dataclass
7
+ import math
8
+ from types import MappingProxyType
9
+ from typing import Any, Mapping
10
+
11
+ import httpx
12
+ import numpy as np
13
+
14
+ from x4d_devkit.clean_basemap import _freeze, _hash, _object, _thaw
15
+ from x4d_devkit.client.assets import _validated_file_uri
16
+ from x4d_devkit.dataset_contract import parse_portable_token
17
+ from x4d_devkit.point_prediction import (
18
+ POINT_PREDICTION_EVALUATION_CONTRACT_VERSION,
19
+ POINT_PREDICTION_OPERATION,
20
+ _STATUSES,
21
+ PointPredictionManifest,
22
+ decode_point_prediction_chunk,
23
+ parse_point_prediction_manifest,
24
+ point_prediction_asset_paths,
25
+ )
26
+
27
+ _BASE = "/semantic-scene/point-predictions"
28
+
29
+
30
+ @dataclass(frozen=True)
31
+ class PointPredictionState:
32
+ project_id: int
33
+ clip_id: str
34
+ basemap_revision: str | None
35
+ status: str
36
+ task_id: str | None
37
+ progress: float
38
+ stage: str | None
39
+ error: Mapping[str, Any] | None
40
+ current: bool
41
+ manifest: PointPredictionManifest | None
42
+ asset_urls: Mapping[str, str]
43
+
44
+ def to_dict(self) -> dict:
45
+ return {
46
+ "operation": POINT_PREDICTION_OPERATION,
47
+ "project_id": self.project_id,
48
+ "clip_id": self.clip_id,
49
+ "basemap_revision": self.basemap_revision,
50
+ "status": self.status,
51
+ "task_id": self.task_id,
52
+ "progress": self.progress,
53
+ "stage": self.stage,
54
+ "error": _thaw(self.error) if self.error is not None else None,
55
+ "current": self.current,
56
+ "manifest": self.manifest.to_dict() if self.manifest is not None else None,
57
+ "asset_urls": dict(self.asset_urls),
58
+ }
59
+
60
+
61
+ def parse_point_prediction_state(
62
+ value: Any,
63
+ *,
64
+ api_url: str,
65
+ project_id: int,
66
+ clip_id: str | None = None,
67
+ task_id: str | None = None,
68
+ ) -> PointPredictionState:
69
+ data = _object(
70
+ value,
71
+ {
72
+ "operation",
73
+ "project_id",
74
+ "clip_id",
75
+ "basemap_revision",
76
+ "status",
77
+ "task_id",
78
+ "progress",
79
+ "stage",
80
+ "error",
81
+ "current",
82
+ "manifest",
83
+ "asset_urls",
84
+ },
85
+ "point prediction state",
86
+ )
87
+ if (
88
+ data["operation"] != POINT_PREDICTION_OPERATION
89
+ or type(data["project_id"]) is not int
90
+ or data["project_id"] != project_id
91
+ ):
92
+ raise ValueError("point prediction operation/project binding is invalid")
93
+ identity = parse_portable_token(data["clip_id"], path="clip_id")
94
+ if clip_id is not None and identity != clip_id:
95
+ raise ValueError("point prediction Clip binding differs from the request")
96
+ revision = data["basemap_revision"]
97
+ if revision is not None:
98
+ _hash(revision, "basemap_revision")
99
+ if data["status"] not in _STATUSES:
100
+ raise ValueError("unknown point prediction task status")
101
+ if data["task_id"] is not None:
102
+ parse_portable_token(data["task_id"], path="task_id")
103
+ if task_id is not None and data["task_id"] != task_id:
104
+ raise ValueError("point prediction task binding differs from the request")
105
+ progress = data["progress"]
106
+ if (
107
+ isinstance(progress, bool)
108
+ or not isinstance(progress, (int, float))
109
+ or not math.isfinite(progress)
110
+ or not 0 <= progress <= 100
111
+ ):
112
+ raise ValueError("point prediction progress must be finite within 0–100")
113
+ if data["stage"] is not None and not isinstance(data["stage"], str):
114
+ raise ValueError("point prediction stage must be text or null")
115
+ error = data["error"]
116
+ if error is not None:
117
+ _object(error, {"code", "message", "retryable", "details"}, "error")
118
+ if (
119
+ not isinstance(error["code"], str)
120
+ or not error["code"]
121
+ or not isinstance(error["message"], str)
122
+ or type(error["retryable"]) is not bool
123
+ or not isinstance(error["details"], dict)
124
+ ):
125
+ raise ValueError("point prediction error must be explicit and structured")
126
+ if (error is not None) != (data["status"] in {"failed", "stale"}):
127
+ raise ValueError("point prediction failure status requires its explicit error")
128
+ if type(data["current"]) is not bool:
129
+ raise ValueError("point prediction current state must be explicit")
130
+ manifest = (
131
+ None
132
+ if data["manifest"] is None
133
+ else parse_point_prediction_manifest(data["manifest"])
134
+ )
135
+ if data["current"] != (manifest is not None):
136
+ raise ValueError("current state requires exactly one immutable manifest")
137
+ if manifest is not None and (
138
+ manifest.clip_id != identity
139
+ or manifest.basemap_revision != revision
140
+ or data["status"] != "completed"
141
+ or progress != 100
142
+ ):
143
+ raise ValueError("current prediction must be completed for the current basemap")
144
+ if (
145
+ data["status"] in {"queued", "accepted", "running", "cancelling"}
146
+ and data["task_id"] is None
147
+ ):
148
+ raise ValueError("active point prediction task must have a task identity")
149
+ urls = data["asset_urls"]
150
+ expected = (
151
+ point_prediction_asset_paths(manifest) if manifest is not None else frozenset()
152
+ )
153
+ if not isinstance(urls, dict) or set(urls) != expected:
154
+ raise ValueError("asset URLs must cover the complete prediction exactly")
155
+ for path, uri in urls.items():
156
+ if not _validated_file_uri(uri, api_url=api_url).endswith(
157
+ f"/clips/{identity}/{path}"
158
+ ):
159
+ raise ValueError("prediction asset URL is bound to a different Clip/path")
160
+ return PointPredictionState(
161
+ project_id,
162
+ identity,
163
+ revision,
164
+ data["status"],
165
+ data["task_id"],
166
+ float(progress),
167
+ data["stage"],
168
+ None if error is None else _freeze(copy.deepcopy(error)),
169
+ data["current"],
170
+ manifest,
171
+ MappingProxyType(dict(urls)),
172
+ )
173
+
174
+
175
+ def parse_point_prediction_evaluation(value: Any, *, clip_id: str) -> dict:
176
+ """Validate the read-only comparison of published labels with a prediction."""
177
+ data = _object(
178
+ value,
179
+ {
180
+ "contract_version",
181
+ "clip_id",
182
+ "prediction_revision",
183
+ "semantic_scene_revision",
184
+ "labeled_points",
185
+ "classes",
186
+ "confidence_bins",
187
+ },
188
+ "point prediction evaluation",
189
+ )
190
+ if (
191
+ data["contract_version"] != POINT_PREDICTION_EVALUATION_CONTRACT_VERSION
192
+ or data["clip_id"] != clip_id
193
+ ):
194
+ raise ValueError("evaluation contract/Clip binding is invalid")
195
+ _hash(data["prediction_revision"], "prediction_revision")
196
+ if data["semantic_scene_revision"] is not None:
197
+ _hash(data["semantic_scene_revision"], "semantic_scene_revision")
198
+ if type(data["labeled_points"]) is not int or data["labeled_points"] < 0:
199
+ raise ValueError("labeled_points must be a nonnegative integer")
200
+ if not isinstance(data["classes"], list) or not isinstance(
201
+ data["confidence_bins"], list
202
+ ):
203
+ raise ValueError("evaluation classes and confidence bins must be lists")
204
+ return copy.deepcopy(data)
205
+
206
+
207
+ class PointPredictionsAPI:
208
+ """Explicit model point prediction capability; never publishes labels."""
209
+
210
+ def __init__(self, client: Any):
211
+ self._client = client
212
+
213
+ def prepare(self, *, project_id: int, clip_id: str) -> PointPredictionState:
214
+ """Start or reuse prediction for the current clean basemap."""
215
+ payload = self._call(
216
+ "post",
217
+ _BASE,
218
+ json={"project_id": _positive(project_id), "clip_id": _text(clip_id)},
219
+ )
220
+ return self._state(payload, project_id, clip_id=clip_id)
221
+
222
+ def get_current(self, *, project_id: int, clip_id: str) -> PointPredictionState:
223
+ payload = self._call(
224
+ "get",
225
+ f"{_BASE}/current",
226
+ params={"project_id": _positive(project_id), "clip_id": _text(clip_id)},
227
+ )
228
+ return self._state(payload, project_id, clip_id=clip_id)
229
+
230
+ def cancel(self, *, project_id: int, task_id: str) -> PointPredictionState:
231
+ payload = self._call(
232
+ "post",
233
+ f"{_BASE}/tasks/{_text(task_id)}/cancel",
234
+ params={"project_id": _positive(project_id)},
235
+ )
236
+ return self._state(payload, project_id, task_id=task_id)
237
+
238
+ def evaluate(self, *, project_id: int, clip_id: str) -> dict:
239
+ payload = self._call(
240
+ "get",
241
+ f"{_BASE}/evaluation",
242
+ params={"project_id": _positive(project_id), "clip_id": _text(clip_id)},
243
+ )
244
+ return parse_point_prediction_evaluation(payload, clip_id=clip_id)
245
+
246
+ def fetch_chunk(
247
+ self, state: PointPredictionState, *, chunk_ordinal: int
248
+ ) -> np.ndarray:
249
+ """Read and verify one prediction chunk through the file proxy."""
250
+ if not isinstance(state, PointPredictionState) or state.manifest is None:
251
+ raise TypeError("a current typed point prediction state is required")
252
+ chunks = state.manifest.data["chunks"]
253
+ if type(chunk_ordinal) is not int or not 0 <= chunk_ordinal < len(chunks):
254
+ raise ValueError("prediction chunk ordinal is outside the exact resource")
255
+ descriptor = chunks[chunk_ordinal]["payload"]
256
+ payload = self._client.assets.fetch(state.asset_urls[descriptor["path"]]).content
257
+ return decode_point_prediction_chunk(
258
+ payload, manifest=state.manifest, chunk_ordinal=chunk_ordinal
259
+ )
260
+
261
+ def _state(self, payload, project_id, **binding) -> PointPredictionState:
262
+ return parse_point_prediction_state(
263
+ payload, api_url=self._client.api_url, project_id=project_id, **binding
264
+ )
265
+
266
+ def _call(self, method: str, path: str, **kwargs: Any) -> Any:
267
+ from x4d_devkit.client.reconstruction import _raise_capability_error
268
+
269
+ try:
270
+ return getattr(self._client, method)(path, **kwargs)
271
+ except httpx.HTTPStatusError as exc:
272
+ _raise_capability_error(exc)
273
+ raise
274
+
275
+
276
+ def _positive(value: Any) -> int:
277
+ if type(value) is not int or value <= 0:
278
+ raise TypeError("project_id must be a positive integer")
279
+ return value
280
+
281
+
282
+ def _text(value: Any) -> str:
283
+ if type(value) is not str or not value or value != value.strip():
284
+ raise TypeError("identifier must be canonical non-empty text")
285
+ return value