[Legacy] Modes

Modes are only used in the creation of PipelineDefinition objects, which are now deprecated in favor of JobDefinition.

class dagster.ModeDefinition(name=None, resource_defs=None, logger_defs=None, executor_defs=None, description=None, _config_mapping=None, _partitioned_config=None)[source]

Define a mode in which a pipeline can operate.

A mode provides pipelines with a set of resource implementations, loggers, system storages, and executors.

Parameters
  • name (Optional[str]) – The name of the mode. Must be unique within the PipelineDefinition to which the mode is attached. (default: “default”).

  • resource_defs (Optional[Mapping [str, ResourceDefinition]]) – A dictionary of string resource keys to their implementations. Individual solids may require resources to be present by these keys.

  • logger_defs (Optional[Dict[str, LoggerDefinition]]) – A dictionary of string logger identifiers to their implementations.

  • executor_defs (Optional[List[ExecutorDefinition]]) – The set of executors available when executing in this mode. By default, this will be the ‘in_process’ and ‘multiprocess’ executors (default_executors).

  • description (Optional[str]) – A human-readable description of the mode.

  • _config_mapping (Optional[ConfigMapping]) – Only for internal use.

  • _partitions (Optional[PartitionedConfig]) – Only for internal use.