0.26.0

SnapshotFuture

Package: flyteplugins.union.sandbox

A snapshot taken, from await sb.snapshot(wait=False): what it holds is fixed and its session runs on. await fut.wait() returns it as a SandboxSnapshot once committed, which is when it can be restored anywhere; env.session(name, snapshot=fut) waits for it too, unless it is a suspend’s to resume in place: that resume goes ahead as soon as the node lets it (once what the snapshot holds is fixed), the commit going on behind. The node commits it whether or not anyone waits.

Parameters

class SnapshotFuture(
    session: str,
    paused_ms: int,
    generation: int,
    committed: Awaitable[SandboxSnapshot],
)
Parameter Type Description
session str
paused_ms int
generation int
committed Awaitable[SandboxSnapshot]

Methods

Method Description
done() Whether it is committed (or its commit failed).
wait() The snapshot, once committed.

done()

def done()

Whether it is committed (or its commit failed).

wait()

def wait()

The snapshot, once committed. Raises if its commit failed (the session runs on, with no snapshot). Waiting again returns the same.