unitlab 3.0.1__tar.gz → 3.0.2__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 (37) hide show
  1. {unitlab-3.0.1 → unitlab-3.0.2}/PKG-INFO +17 -3
  2. {unitlab-3.0.1 → unitlab-3.0.2}/README.md +15 -1
  3. {unitlab-3.0.1 → unitlab-3.0.2}/pyproject.toml +1 -1
  4. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/__init__.py +2 -0
  5. unitlab-3.0.2/src/unitlab/_uploader.py +779 -0
  6. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/_waiter.py +25 -10
  7. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/cli.py +1 -0
  8. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/exceptions.py +5 -1
  9. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/assets.py +39 -1
  10. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/releases.py +0 -5
  11. {unitlab-3.0.1 → unitlab-3.0.2}/tests/test_cli.py +2 -0
  12. {unitlab-3.0.1 → unitlab-3.0.2}/tests/test_client.py +1 -2
  13. {unitlab-3.0.1 → unitlab-3.0.2}/tests/test_downloader.py +28 -0
  14. unitlab-3.0.2/tests/test_tiled_uploads.py +510 -0
  15. {unitlab-3.0.1 → unitlab-3.0.2}/tests/test_uploader.py +32 -0
  16. unitlab-3.0.1/src/unitlab/_uploader.py +0 -418
  17. {unitlab-3.0.1 → unitlab-3.0.2}/.gitignore +0 -0
  18. {unitlab-3.0.1 → unitlab-3.0.2}/LICENSE.md +0 -0
  19. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/__main__.py +0 -0
  20. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/_config.py +0 -0
  21. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/_downloader.py +0 -0
  22. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/_grouping.py +0 -0
  23. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/_http.py +0 -0
  24. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/client.py +0 -0
  25. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/ontology.py +0 -0
  26. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/py.typed +0 -0
  27. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/__init__.py +0 -0
  28. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/_base.py +0 -0
  29. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/cloud.py +0 -0
  30. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/datasets.py +0 -0
  31. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/embeddings.py +0 -0
  32. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/ontologies.py +0 -0
  33. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/projects.py +0 -0
  34. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/resources/workflow.py +0 -0
  35. {unitlab-3.0.1 → unitlab-3.0.2}/src/unitlab/types.py +0 -0
  36. {unitlab-3.0.1 → unitlab-3.0.2}/tests/test_embeddings.py +0 -0
  37. {unitlab-3.0.1 → unitlab-3.0.2}/tests/test_http.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: unitlab
3
- Version: 3.0.1
3
+ Version: 3.0.2
4
4
  Summary: Python SDK for the Unitlab.ai data annotation platform
5
5
  Project-URL: Homepage, https://unitlab.ai
6
6
  Project-URL: Documentation, https://docs.unitlab.ai
@@ -214,6 +214,7 @@ project = client.projects.get("PROJECT_ID")
214
214
  project = client.projects.create("Road scenes")
215
215
 
216
216
  batch = project.upload("./data", fps=2.0)
217
+ tiled_batch = project.upload("./maps")
217
218
 
218
219
  status = batch.status()
219
220
  status = batch.wait(timeout=1800)
@@ -228,6 +229,11 @@ status = queue.wait()
228
229
  Completion means `processing == 0`; a completed Batch Queue may still report
229
230
  individual failures.
230
231
 
232
+ GeoTIFF and whole-slide files are detected automatically. Large tiled files
233
+ upload directly to storage in bounded parts. Tiled processing can take hours,
234
+ so use a longer timeout such as `batch.wait(timeout=25200)` when the next
235
+ operation depends on the generated COG/DZI derivative.
236
+
231
237
  ### Data Units and project lifecycle
232
238
 
233
239
  ```python
@@ -257,12 +263,18 @@ items = folder.list_items()
257
263
  result = client.assets.upload("./images", folder_id=folder.id, tags=["train"])
258
264
  asset = result.assets[0]
259
265
 
266
+ tiled = client.assets.upload(
267
+ "./slides",
268
+ folder_id=folder.id,
269
+ )
270
+ tiled.assets[0].wait()
271
+
260
272
  cloud_folder = client.assets.create_cloud_folder(
261
273
  "Incoming",
262
274
  "CLOUD_STORAGE_ID",
263
275
  prefix="incoming/",
264
276
  )
265
- cloud_folder.sync_cloud()
277
+ cloud_folder.sync_cloud() # Tiled files are registered as processing Assets.
266
278
  ```
267
279
 
268
280
  ### Datasets and published versions
@@ -398,6 +410,7 @@ unitlab project data-unit PROJECT_ID DATA_UNIT_ID
398
410
  unitlab project sources PROJECT_ID
399
411
  unitlab project detach-source PROJECT_ID SOURCE_LINK_ID --preview
400
412
  unitlab project upload PROJECT_ID --source ./data
413
+ unitlab project upload PROJECT_ID --source ./maps
401
414
  unitlab batch-queue list PROJECT_ID
402
415
  unitlab batch-queue detail PROJECT_ID BATCH_QUEUE_ID
403
416
  unitlab batch-queue status PROJECT_ID BATCH_QUEUE_ID
@@ -412,6 +425,7 @@ unitlab project attach PROJECT_ID --dataset-version DATASET_ID:2
412
425
 
413
426
  # Assets
414
427
  unitlab assets upload ./data --folder "Raw data" --tag incoming
428
+ unitlab assets upload ./slides --folder "Slides"
415
429
 
416
430
  # Folders
417
431
  unitlab folders create "Raw data"
@@ -181,6 +181,7 @@ project = client.projects.get("PROJECT_ID")
181
181
  project = client.projects.create("Road scenes")
182
182
 
183
183
  batch = project.upload("./data", fps=2.0)
184
+ tiled_batch = project.upload("./maps")
184
185
 
185
186
  status = batch.status()
186
187
  status = batch.wait(timeout=1800)
@@ -195,6 +196,11 @@ status = queue.wait()
195
196
  Completion means `processing == 0`; a completed Batch Queue may still report
196
197
  individual failures.
197
198
 
199
+ GeoTIFF and whole-slide files are detected automatically. Large tiled files
200
+ upload directly to storage in bounded parts. Tiled processing can take hours,
201
+ so use a longer timeout such as `batch.wait(timeout=25200)` when the next
202
+ operation depends on the generated COG/DZI derivative.
203
+
198
204
  ### Data Units and project lifecycle
199
205
 
200
206
  ```python
@@ -224,12 +230,18 @@ items = folder.list_items()
224
230
  result = client.assets.upload("./images", folder_id=folder.id, tags=["train"])
225
231
  asset = result.assets[0]
226
232
 
233
+ tiled = client.assets.upload(
234
+ "./slides",
235
+ folder_id=folder.id,
236
+ )
237
+ tiled.assets[0].wait()
238
+
227
239
  cloud_folder = client.assets.create_cloud_folder(
228
240
  "Incoming",
229
241
  "CLOUD_STORAGE_ID",
230
242
  prefix="incoming/",
231
243
  )
232
- cloud_folder.sync_cloud()
244
+ cloud_folder.sync_cloud() # Tiled files are registered as processing Assets.
233
245
  ```
234
246
 
235
247
  ### Datasets and published versions
@@ -365,6 +377,7 @@ unitlab project data-unit PROJECT_ID DATA_UNIT_ID
365
377
  unitlab project sources PROJECT_ID
366
378
  unitlab project detach-source PROJECT_ID SOURCE_LINK_ID --preview
367
379
  unitlab project upload PROJECT_ID --source ./data
380
+ unitlab project upload PROJECT_ID --source ./maps
368
381
  unitlab batch-queue list PROJECT_ID
369
382
  unitlab batch-queue detail PROJECT_ID BATCH_QUEUE_ID
370
383
  unitlab batch-queue status PROJECT_ID BATCH_QUEUE_ID
@@ -379,6 +392,7 @@ unitlab project attach PROJECT_ID --dataset-version DATASET_ID:2
379
392
 
380
393
  # Assets
381
394
  unitlab assets upload ./data --folder "Raw data" --tag incoming
395
+ unitlab assets upload ./slides --folder "Slides"
382
396
 
383
397
  # Folders
384
398
  unitlab folders create "Raw data"
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "unitlab"
7
- version = "3.0.1"
7
+ version = "3.0.2"
8
8
  description = "Python SDK for the Unitlab.ai data annotation platform"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -3,6 +3,7 @@ from importlib.metadata import version
3
3
  from ._grouping import tiles_from_template
4
4
  from .client import UnitlabClient
5
5
  from .exceptions import (
6
+ AmbiguousUploadCompletionError,
6
7
  AuthenticationError,
7
8
  NetworkError,
8
9
  NotFoundError,
@@ -55,6 +56,7 @@ from .types import (
55
56
  __version__ = version("unitlab")
56
57
 
57
58
  __all__ = [
59
+ "AmbiguousUploadCompletionError",
58
60
  "Asset",
59
61
  "AssetUploadResult",
60
62
  "AttachPreview",