fiftyone.operators.decorators#

FiftyOne operator decorators.

Copyright 2017-2026, Voxel51, Inc.

Functions:

coroutine_timeout(seconds)

timeout(seconds)

Context manager that raises a TimeoutError if its body runs for longer than the given number of seconds.

raise_timeout_error(seconds)

plugins_cache(func)

Decorator that returns cached function results as long as no plugins have been modified since last time.

dir_state(dirpath)

fiftyone.operators.decorators.coroutine_timeout(seconds)#
fiftyone.operators.decorators.timeout(seconds: int)#

Context manager that raises a TimeoutError if its body runs for longer than the given number of seconds.

Must be entered from the main thread of the main interpreter, because it installs a SIGALRM handler and signal.signal() raises a ValueError in any other thread.

Parameters:

seconds – the timeout, in seconds

fiftyone.operators.decorators.raise_timeout_error(seconds)#
fiftyone.operators.decorators.plugins_cache(func)#

Decorator that returns cached function results as long as no plugins have been modified since last time.

fiftyone.operators.decorators.dir_state(dirpath)#