QDpy
Loading...
Searching...
No Matches
base.py File Reference

Execution backends, object registry, configuration, and snapshot writing. More...

Go to the source code of this file.

Classes

class  qdpy.base.FutureLike
 CONCURRENCY ########### {{{1. More...
class  qdpy.base.ExecutorLike
class  qdpy.base.SequentialFuture
class  qdpy.base.SequentialExecutor
class  qdpy.base.SequentialExecutor.ScoopExecutor
class  qdpy.base.ScoopExecutor
class  qdpy.base.RayFuture
class  qdpy.base.RayDeployment
class  qdpy.base.RayExecutor
class  qdpy.base.ParallelismManager
class  qdpy.base.Summarisable
class  qdpy.base.Saveable
class  qdpy.base.Copyable
class  qdpy.base.CreatableFromConfig
class  qdpy.base.Registry
class  qdpy.base.Factory

Namespaces

namespace  qdpy

Functions

 qdpy.base._ray_as_completed_fn (fs, timeout=None)
 Yield each unique ready reference once.
FutureLike qdpy.base.generic_as_completed (Sequence[FutureLike] fs, Optional[int] timeout=None)
 qdpy.base._atomic_output_path (output_path)
 Yield a temporary sibling path for the new result.

Variables

 qdpy.base.T = TypeVar("T")
 INTERFACES AND STUBS ########### {{{1.

Detailed Description

Execution backends, object registry, configuration, and snapshot writing.

Definition in file base.py.

Function Documentation

◆ _atomic_output_path()

qdpy.base._atomic_output_path ( output_path)
protected

Yield a temporary sibling path for the new result.

Parameters
output_pathFinal path after a successful write.

Replace the destination only after the writer returns normally. Keeping the temporary file in the same directory allows the final replace to use the destination's filesystem.

Definition at line 501 of file base.py.

◆ _ray_as_completed_fn()

qdpy.base._ray_as_completed_fn ( fs,
timeout = None )
protected

Yield each unique ready reference once.

Parameters
fsRay futures to wait for.
timeoutOptional total wait limit in seconds.
Exceptions
TimeoutErrorIf no ready reference arrives before the deadline.

Carry Ray's pending subset forward so completed futures are removed from the next wait.

Definition at line 254 of file base.py.

◆ generic_as_completed()

FutureLike qdpy.base.generic_as_completed ( Sequence[FutureLike] fs,
Optional[int] timeout = None )
Return the next completed future from a homogeneous nonempty sequence.

Sequential futures have already completed. Concurrent futures, SCOOP,
and Ray use their respective completion mechanisms.

:param fs: Pending futures from one backend.
:param timeout: Optional wait limit in seconds, passed to that backend.
:raises ValueError: If the input is empty or the backend is unknown.

Definition at line 285 of file base.py.