Skip to main content

SandboxedConfig

Configuration for a sandboxed task executed via Monty.

Attributes

AttributeTypeDescription
max_memoryint = 52428800Maximum memory in bytes allocated for the sandboxed task, defaulting to 50 MB.
max_stack_depthint = 256The maximum depth of the call stack allowed during execution to prevent stack overflow errors.
timeout_msint = 30000The maximum duration in milliseconds the sandboxed task is permitted to run before being terminated.
type_checkbool = trueFlag indicating whether to perform runtime type validation on the sandboxed code execution.

Constructor

Signature

def SandboxedConfig() - > null

Signature

def SandboxedConfig(
max_memory: int = 52428800,
max_stack_depth: int = 256,
timeout_ms: int = 30000,
type_check: bool = True
) - > null

Parameters

NameTypeDescription
max_memoryint = 52428800The maximum memory allocation in bytes allowed for the sandboxed environment.
max_stack_depthint = 256The maximum depth of the call stack to prevent recursion-based overflows.
timeout_msint = 30000The execution time limit in milliseconds before the task is forcefully terminated.
type_checkbool = TrueA flag indicating whether strict type checking should be enforced during task execution.