on_enter

function

gworker_client.lifecycle.on_enter

Lifecycle hook that runs once per container at startup, before the first input is processed. Use to load model weights, open database connections, or perform other one-time initialisation. Pass snap=True to include this method in sandbox snapshots.

Signature

python
1on_enter(snap: bool = False) -> Callable[[_F], _F]

← Back to docs