nv_ingest_api.internal.meta package#

Submodules#

nv_ingest_api.internal.meta.udf module#

class nv_ingest_api.internal.meta.udf.CachedUDF(
function: callable,
function_name: str,
signature_validated: bool,
created_at: float,
last_used: float,
use_count: int,
)[source]#

Bases: object

Cached UDF function with metadata

created_at: float#
function: callable#
function_name: str#
last_used: float#
signature_validated: bool#
use_count: int#
class nv_ingest_api.internal.meta.udf.UDFCache(max_size: int = 128, ttl_seconds: int | None = 3600)[source]#

Bases: object

LRU cache for compiled and validated UDF functions

get(
udf_function_str: str,
udf_function_name: str,
) CachedUDF | None[source]#

Get cached UDF function if available

get_stats() Dict[str, Any][source]#

Get cache statistics

put(
udf_function_str: str,
udf_function_name: str,
function: callable,
signature_validated: bool = True,
) str[source]#

Cache a compiled and validated UDF function

nv_ingest_api.internal.meta.udf.compile_and_validate_udf(
udf_function_str: str,
udf_function_name: str,
task_num: int,
) callable[source]#

Compile and validate UDF function (extracted for caching)

nv_ingest_api.internal.meta.udf.get_udf_cache_stats() Dict[str, Any][source]#

Get UDF cache performance statistics

nv_ingest_api.internal.meta.udf.udf_stage_callable_fn(
control_message: IngestControlMessage,
stage_config: UDFStageSchema,
) IngestControlMessage[source]#

UDF stage callable function that processes UDF tasks in a control message.

This function extracts all UDF tasks from the control message and executes them sequentially.

Parameters:
Returns:

The control message after processing all UDF tasks

Return type:

IngestControlMessage

Module contents#