For the complete documentation index, see llms.txt. This page is also available as Markdown.

Pattern: Cloud folder to project

Browse an approved prefix, import it into a project, and monitor the created Batch Queue.

Outcome: Browse an approved prefix, import it into a project, and monitor the created Batch Queue.

storage = client.cloud_storages.get("CLOUD_STORAGE_ID")
entries = list(storage.browse(prefix="incoming/study-001/"))
if not entries:
    raise RuntimeError("Cloud prefix is empty")

batch = project.import_cloud(storage, ["incoming/study-001/"])
status = batch.wait(timeout=1800)
if status.failed:
    for row in project.batch_queue(batch.batch_queue_id).data():
        print(row)

Record the storage ID, prefix, project ID, Batch Queue ID, and final counts. Browse metadata is a preflight; the authoritative ingestion result is the Batch Queue.

Operating contract

Concern
Required behavior

Execution surface

Pinned unitlab==3.0.0 application environment on Python 3.10+.

Identity

Least-privilege API key supplied through approved configuration.

Target resolution

Stable resource IDs and an explicitly bounded target set.

Success evidence

Typed return fields, server-side state, and downstream acceptance of the result.

Failure and recovery boundary

Condition
Response

Authentication or authorization fails

Stop, correct the service identity or access model, rotate exposed credentials, and rerun a read-only check.

Validation or entitlement rejects the operation

Correct the input or entitlement; do not retry an unchanged request.

A request times out

Inspect remote state before repeating a mutation because the server may have accepted it.

Asynchronous processing exceeds its deadline

Preserve the Batch Queue or release ID, continue bounded monitoring, and inspect item-level failures.

Only part of a batch succeeds

Keep successful identifiers, isolate failed rows, and retry only the corrected subset.


Explore related Unitlab capabilities: training-data curation workflows