ezmsg Entry Point#
An ezmsg pipeline is instantiated through a call to ezmsg.core.run().
Note
It is convention to import ezmsg.core as ez and then use this shorthand in your code.
- ezmsg.core.run(components=None, root_name=None, connections=None, process_components=None, backend_process=<class 'ezmsg.core.backendprocess.DefaultBackendProcess'>, graph_address=None, force_single_process=False, profiler_log_name=None, **components_kwargs)[source]#
Begin execution of a set of Components.
This is the main entry point for running ezmsg applications. It sets up the execution environment, initializes components, and manages the message-passing infrastructure.
On initialization, ezmsg will call
initialize()for eachUnitandconfigure()for eachCollection, if defined. On initialization, ezmsg will create a directed acyclic graph using the contents ofconnections.- Parameters:
components (
Mapping[str,Component] |None) – Dictionary mapping component names to Component objects. The components are the nodes in the ezmsg (directed acyclic) graph.root_name (
str|None) – Optional root name for the component hierarchyconnections (
Iterable[tuple[Stream|str,Stream|str]] |None) – Network definition specifying stream connections between components. These are the edges in the ezmsg graph, connecting OutputStreams to InputStreams.process_components (
Collection[Component] |None) – Collection of components that should run in separate processesbackend_process (
type[BackendProcess]) – Backend process class to use for execution. Currently under development.graph_address (
tuple[str,int] |Address|None) – Address (hostname and port) of graph server which ezmsg should connect to. If not defined, ezmsg will start a new graph server at 127.0.0.1:25978.force_single_process (
bool) – Whether to force all components into a single processcomponents_kwargs (
Component) – Additional components specified as keyword arguments
- Return type:
Note
Since jupyter notebooks run in a single process, you must set force_single_process=True.
Note
The old method
run_systemhas been deprecated and usesrun()instead.