Retrieve
Provides coroutine-based access to retrieve stored model assets, invocation inputs, and invocation outputs from the Norman persistence layer.
The Retrieve class allows direct download of stored binary content via iterator-based responses for efficient streaming.
get_invocation_input(token, account_id, model_id, invocation_id, input_id) async
Coroutine
Retrieve a specific invocation input file.
This method streams input data that was used in a particular model invocation, enabling efficient file-based access for audits or reprocessing.
Parameters
token (
Sensitive[str]) — Authentication token authorizing the request.account_id (
str) — ID of the account that owns the invocation.model_id (
str) — ID of the model associated with the invocation.invocation_id (
str) — Unique identifier of the invocation.input_id (
str) — Unique identifier of the invocation input to retrieve.
Response Structure
response (
AsyncIterator[bytes]) — Asynchronous byte stream yielding the input file data.
Example Usage:
get_invocation_output(token, account_id, model_id, invocation_id, output_id) async
Coroutine
Retrieve a specific invocation output file.
This method streams the raw output data generated by a model invocation, enabling efficient access to large binary results such as images or logs.
Parameters
token (
Sensitive[str]) — Authentication token authorizing the request.account_id (
str) — ID of the account that owns the invocation.model_id (
str) — ID of the model that produced the output.invocation_id (
str) — Unique identifier of the invocation.output_id (
str) — Unique identifier of the output to retrieve.
Response Structure
response (
AsyncIterator[bytes]) — Asynchronous byte stream yielding the invocation output data.
Example Usage:
get_model_asset(token, account_id, model_id, asset_id) async
Coroutine
Retrieve a specific model asset from Norman storage.
This method streams the raw asset data (e.g., model weights, tokenizer, etc.) associated with a given account and model.
Parameters
token (
Sensitive[str]) — Authentication token authorizing the request.account_id (
str) — The unique identifier of the account that owns the model.model_id (
str) — The unique identifier of the model to which the asset belongs.asset_id (
str) — The unique identifier of the asset file to retrieve.
Response Structure
response (
AsyncIterator[bytes]) — Asynchronous byte stream yielding the asset data in chunks.