deisa.ray.config module

class deisa.ray.config.Config[source]

Bases: object

Process-wide configuration for the deisa library.

Mutable until locked. Instantiating Deisa() locks configuration to prevent mid-run behavior changes.

enable_experimental_distributed_scheduling(enabled: bool = True) None[source]

Enable/disable experimental distributed scheduling.

Parameters:

enabled (bool, optional) – Desired state of the flag. Defaults to True.

Raises:
  • ConfigError – If configuration has already been locked by instantiating Deisa.

  • TypeError – If enabled is not a boolean.

Examples

>>> deisa.config.enable_experimental_distributed_scheduling()      # enable
>>> deisa.config.enable_experimental_distributed_scheduling(False) # disable
property experimental_distributed_scheduling_enabled: bool

Read-only accessor for the experimental distributed scheduling flag.

Returns:

True when distributed scheduling is enabled, False otherwise.

Return type:

bool

is_locked() bool[source]

Report whether the configuration has been locked.

Returns:

True if lock() has been called, otherwise False.

Return type:

bool

lock() None[source]

Make configuration immutable for the remainder of the process.

Notes

Called automatically when Deisa() is instantiated. Further mutation attempts will raise ConfigError.