unitlab 2.5.0__tar.gz → 2.5.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitlab
3
- Version: 2.5.0
3
+ Version: 2.5.1
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "unitlab"
7
- version = "2.5.0"
7
+ version = "2.5.1"
8
8
  description = "Python SDK for the Unitlab.ai data annotation platform"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -313,9 +313,9 @@ class UnitlabClient:
313
313
  num_batches = (num_files + batch_size - 1) // batch_size
314
314
  semaphore = asyncio.Semaphore(_UPLOAD_CONCURRENCY)
315
315
 
316
- # Medical files in the same upload run share one session; non-medical
317
- # files are sent without it.
318
- medical_session_id = str(uuid.uuid4())
316
+ # Files in the same upload run share one project upload session. Medical
317
+ # finalization uses the same id for its series-level grouping.
318
+ upload_session_id = str(uuid.uuid4())
319
319
 
320
320
  # Finalization is only relevant when this batch includes medical files.
321
321
  has_medical_files = any(
@@ -336,8 +336,7 @@ class UnitlabClient:
336
336
  extra_data: dict[str, str] = {}
337
337
  if file_generic_type == "video":
338
338
  extra_data["fps"] = str(fps)
339
- elif file_generic_type == "medical":
340
- extra_data["session_id"] = medical_session_id
339
+ extra_data["session_id"] = upload_session_id
341
340
 
342
341
  try:
343
342
  with open(file, "rb") as f:
@@ -398,7 +397,7 @@ class UnitlabClient:
398
397
  try:
399
398
  response = await client.post(
400
399
  f"/api/sdk/projects/{project_id}/"
401
- f"medical-upload-sessions/{medical_session_id}/finalize/",
400
+ f"medical-upload-sessions/{upload_session_id}/finalize/",
402
401
  )
403
402
  response.raise_for_status()
404
403
  logger.info("Medical session finalized")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes