Skip to content

trulens.core.utils.signature

trulens.core.utils.signature

Utilities related to guessing inputs and outputs of functions.

Functions

main_input

main_input(
    func: Callable, sig: Signature, bindings: BoundArguments
) -> str

Determine (guess) the main input string for a main app call.

PARAMETER DESCRIPTION
func

The main function we are targeting in this determination.

TYPE: Callable

sig

The signature of the above.

TYPE: Signature

bindings

The arguments to be passed to the function.

TYPE: BoundArguments

RETURNS DESCRIPTION
str

The main input string.

main_output

main_output(func: Callable, ret: Any) -> str

Determine (guess) the "main output" string for a given main app call.

This is for functions whose output is not a string.

PARAMETER DESCRIPTION
func

The main function whose main output we are guessing.

TYPE: Callable

ret

The return value of the function.

TYPE: Any