Exceptions and limits

All SDK exceptions derive from GradientDynamicsError.

exception gradientdynamics.exceptions.GradientDynamicsError

Base exception raised by the gradientdynamics package.

exception gradientdynamics.exceptions.AuthenticationError

Credentials are missing, expired or not permitted to access the resource.

exception gradientdynamics.exceptions.ValidationError

Configuration validation failed before compute allocation.

errors: Sequence[FieldError]

Structured field paths, messages and rejected values.

exception gradientdynamics.exceptions.NotFoundError

The requested resource or completed asset does not exist in the authenticated organisation.

exception gradientdynamics.exceptions.ResourceNotReadyError

A result was requested before its job completed.

exception gradientdynamics.exceptions.CapacityError

Current meshing or GPU capacity is full.

retry_after: float | None

Suggested delay in seconds before another request.

exception gradientdynamics.exceptions.JobFailedError

Remote execution reached a terminal failure.

stage: str | None
job_id: str
exception gradientdynamics.exceptions.ServiceUnavailableError

The service cannot safely execute the operation at present.

Handling temporary failures

import time

from gradientdynamics.exceptions import CapacityError

try:
    job = simulation.run(idempotency_key="road-car-baseline-v1")
except CapacityError as exc:
    time.sleep(exc.retry_after or 30.0)
    job = simulation.run(idempotency_key="road-car-baseline-v1")

Retry temporary network, capacity and availability failures with bounded backoff. Do not automatically retry schema, topology or boundary-name errors. Read the original job before retrying after a lost response, and reuse the same idempotency key only for the same intended operation.

Organisation limits

Meshing concurrency, CPU memory, GPU capacity, project quotas, storage and retention are organisation- and environment-specific. The client exposes enabled capabilities and quota summaries through gradientdynamics.Client.organisation; scripts should handle queueing without creating duplicate work.