Updates SDK Ref doc strings #1009
Open
GitHub Actions / SDK integration test report
failed
Nov 6, 2025 in 0s
1 fail, 4 skipped, 280 pass in 17m 38s
285 tests 280 ✅ 17m 38s ⏱️
1 suites 4 💤
1 files 1 ❌
Results for commit cea52bd.
Annotations
Check warning on line 0 in datasets.test_image_group
github-actions / SDK integration test report
test_create_image_group[ssh-key-authentication-False] (datasets.test_image_group) failed
./encord-backend/projects/sdk-integration-tests/integration-test-report-python3_13.xml [took 5s]
Raw output
encord.exceptions.EncordException: An error has occurred during image group creation. res.data_hashes_with_titles=[] is empty, upload_job_id='3c6383dc-484d-48cf-ad66-9e9e86a6ef01' timestamp='2025-11-06T17:30:43.727125+00:00'
ephemeral_cord_dataset_client = <encord.dataset.Dataset object at 0x7f8da4fdc6d0>
create_video = False
@pytest.mark.parametrize("create_video", [False, True])
def test_create_image_group(
ephemeral_cord_dataset_client: EncordClientDataset | Dataset,
create_video: bool,
) -> None:
with tempfile.TemporaryDirectory() as tmp_dir:
directory_path = Path(tmp_dir)
file_names = get_file_names(directory_path)
create_image_files(file_names)
> image_group_ret = ephemeral_cord_dataset_client.create_image_group(
file_names,
title=CUSTOM_IMAGE_GROUP_TITLE,
create_video=create_video,
)
src/sdk_integration_tests/tests/datasets/test_image_group.py:23:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.venv/lib/python3.11/site-packages/encord/dataset.py:279: in create_image_group
return self._client.create_image_group(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <encord.client.EncordClientDataset object at 0x7f8da4fdca10>
file_paths = [PosixPath('/tmp/tmpkoiuofig/test_image1.png'), PosixPath('/tmp/tmpkoiuofig/test_image2.png'), PosixPath('/tmp/tmpkoiuofig/test_image3.png')]
max_workers = None
cloud_upload_settings = CloudUploadSettings(max_retries=None, backoff_factor=None, allow_failures=False)
title = 'Custom image group title'
def create_image_group(
self,
file_paths: Iterable[Union[str, Path]],
max_workers: Optional[int] = None,
cloud_upload_settings: CloudUploadSettings = CloudUploadSettings(),
title: Optional[str] = None,
*,
create_video: bool = True,
folder_uuid: Optional[uuid.UUID] = None,
) -> List[ImageGroup]:
"""This function is documented in :meth:`encord.dataset.Dataset.create_image_group`."""
signed_urls = upload_to_signed_url_list(
file_paths=file_paths,
config=self._config,
api_client=self._api_client,
upload_item_type=StorageItemType.IMAGE,
cloud_upload_settings=cloud_upload_settings,
)
if not signed_urls:
raise encord.exceptions.EncordException("All image uploads failed. Image group was not created.")
upload_job_id = self._querier.basic_setter(
DatasetDataLongPolling,
uid=self._querier.resource_id,
payload=DatasetDataLongPollingParams(
data_items=DataUploadItems(
image_groups=[
DataUploadImageGroup(
images=[
DataUploadImageGroupImage(
url=x["file_link"],
title=x["title"],
)
for x in signed_urls
],
title=title,
create_video=create_video,
cluster_by_resolution=create_video, # cluster_by_resolution only if videos are created
)
],
),
files=None,
integration_id=None,
ignore_errors=False,
folder_uuid=folder_uuid,
file_name=None,
),
)["process_hash"]
res = self.__add_data_to_dataset_get_result(upload_job_id)
if res.status == LongPollingStatus.DONE:
if not res.data_hashes_with_titles:
> raise encord.exceptions.EncordException(
f"An error has occurred during image group creation. {res.data_hashes_with_titles=} is empty, {upload_job_id=}"
)
E encord.exceptions.EncordException: An error has occurred during image group creation. res.data_hashes_with_titles=[] is empty, upload_job_id='3c6383dc-484d-48cf-ad66-9e9e86a6ef01' timestamp='2025-11-06T17:30:43.727125+00:00'
.venv/lib/python3.11/site-packages/encord/client.py:442: EncordException
Loading