nemo_rl.models.generation.dynamo.http_client#

Small HTTP client helpers shared by managed Dynamo components.

Module Contents#

Functions#

_decode_json_object

Decode an HTTP response body using the shared Dynamo error contract.

http_post_json

POST JSON and return either the decoded object or an error object.

async_http_post_json

POST JSON without blocking the rollout actor event loop.

format_dynamo_error

Format an error object returned by :func:http_post_json.

API#

nemo_rl.models.generation.dynamo.http_client._decode_json_object(body: bytes) dict[str, Any]#

Decode an HTTP response body using the shared Dynamo error contract.

nemo_rl.models.generation.dynamo.http_client.http_post_json(
url: str,
payload: dict[str, Any],
timeout_s: float,
) dict[str, Any]#

POST JSON and return either the decoded object or an error object.

async nemo_rl.models.generation.dynamo.http_client.async_http_post_json(
url: str,
payload: dict[str, Any],
timeout_s: float,
) dict[str, Any]#

POST JSON without blocking the rollout actor event loop.

nemo_rl.models.generation.dynamo.http_client.format_dynamo_error(response: dict[str, Any]) str#

Format an error object returned by :func:http_post_json.