Skip to main content

CodeTaskTemplate

A sandboxed task created from a code string rather than a decorated function. Unlike SandboxedTaskTemplate (which extracts source from a Python function), this class accepts pre-transformed source code and an explicit dict of external functions. It is constructed via flyte.sandbox.orchestrator_from_str.

Methods


forward()

@classmethod
def forward(
args: *args,
kwargs: **kwargs
) - > Any

This method is not supported for CodeTaskTemplate instances because there is no direct Python function to call. Callers should use flyte.run() to execute the task through the sandbox environment.

Parameters

NameTypeDescription
args*argsPositional arguments passed to the method.
kwargs**kwargsKeyword arguments passed to the method.

Returns

TypeDescription
AnyThis method raises a NotImplementedError.