Skip to content

response

response

The status message a remote job sends back to the client.

Each update NDIF pushes for a job — whether streamed over a blocking websocket or saved to the object store and polled — arrives as a ResponseModel. Its Status names where the job is in its lifecycle; on COMPLETED the returned values ride in data.

RESULT module-attribute

RESULT = Dict[str, Any]

Status

Bases: str, Enum

Where a remote job is in its lifecycle (or a transient log message).

RECEIVED class-attribute instance-attribute

RECEIVED = 'RECEIVED'

QUEUED class-attribute instance-attribute

QUEUED = 'QUEUED'

PROVISIONING class-attribute instance-attribute

PROVISIONING = 'PROVISIONING'

DEPLOYING class-attribute instance-attribute

DEPLOYING = 'DEPLOYING'

DISPATCHED class-attribute instance-attribute

DISPATCHED = 'DISPATCHED'

RUNNING class-attribute instance-attribute

RUNNING = 'RUNNING'

COMPLETED class-attribute instance-attribute

COMPLETED = 'COMPLETED'

ERROR class-attribute instance-attribute

ERROR = 'ERROR'

LOG class-attribute instance-attribute

LOG = 'LOG'

ResponseModel

Bases: BaseModel

One status update for a remote job, optionally carrying its result.

Streamed over the websocket for a blocking job, or saved to the object store and fetched by the client for a non-blocking one. data holds the saved values only on a COMPLETED response.

model_config class-attribute instance-attribute

model_config = ConfigDict(arbitrary_types_allowed=True, protected_namespaces=())

id instance-attribute

id: str

status instance-attribute

status: Status

description class-attribute instance-attribute

description: str = ''

data class-attribute instance-attribute

data: Optional[Any] = None

__str__

__str__() -> str

pickle

pickle() -> bytes

Serialize to bytes via torch.save (carries tensors in data).

unpickle classmethod

unpickle(data: bytes) -> ResponseModel

Rebuild a ResponseModel from pickle bytes (onto CPU).