Skip to main content

ComputeActionOutputPath

Constructs the full output directory for a task action, including a deterministic shard prefix for storage hot-spot avoidance and an attempt segment to isolate retries.

def ComputeActionOutputPath(
ctx: context.Context,
namespace: string,
name: string,
runOutputBase: string,
actionName: string,
attempt: uint32
) - > storage.DataReference, error

Constructs the full output directory for a task action, including a sharded path for hot-spot avoidance and an attempt segment for retries. This function is used to generate a unique and optimized storage path for each action's output.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and timeouts.
namespacestringThe namespace of the TaskAction, used to deterministically derive the shard prefix.
namestringThe name of the TaskAction, used to deterministically derive the shard prefix.
runOutputBasestringThe base output path for the run, which will be augmented with sharding, action name, and attempt number.
actionNamestringThe name of the specific action within the task, used as a segment in the output path.
attemptuint32The attempt number for the action, used to isolate each retry in the output path.

Returns

TypeDescription
storage.DataReference, errorThe full output path as a storage.DataReference and an error if parsing or sharding fails.