Runs the computation graph. Args: debug: enable output out of table.debug() operators monitoring_level: the verbosity of stats monitoring mechanism. One of pathway.MonitoringLevel.NONE, pathway.MonitoringLevel.IN_OUT, pathway.MonitoringLevel.ALL. If unset
(
*,
debug: bool = False,
monitoring_level: MonitoringLevel = MonitoringLevel.AUTO,
with_http_server: bool = False,
default_logging: bool = True,
persistence_config: PersistenceConfig | None = None,
runtime_typechecking: bool | None = None,
terminate_on_error: bool | None = None,
max_expression_batch_size: int = 1024,
event_loop: asyncio.AbstractEventLoop | None = None,
)
| 11 | |
| 12 | @check_arg_types |
| 13 | def run( |
| 14 | *, |
| 15 | debug: bool = False, |
| 16 | monitoring_level: MonitoringLevel = MonitoringLevel.AUTO, |
| 17 | with_http_server: bool = False, |
| 18 | default_logging: bool = True, |
| 19 | persistence_config: PersistenceConfig | None = None, |
| 20 | runtime_typechecking: bool | None = None, |
| 21 | terminate_on_error: bool | None = None, |
| 22 | max_expression_batch_size: int = 1024, |
| 23 | event_loop: asyncio.AbstractEventLoop | None = None, |
| 24 | ) -> None: |
| 25 | """Runs the computation graph. |
| 26 | |
| 27 | Args: |
| 28 | debug: enable output out of table.debug() operators |
| 29 | monitoring_level: the verbosity of stats monitoring mechanism. One of |
| 30 | pathway.MonitoringLevel.NONE, pathway.MonitoringLevel.IN_OUT, |
| 31 | pathway.MonitoringLevel.ALL. If unset, pathway will choose between |
| 32 | NONE and IN_OUT based on output interactivity. |
| 33 | with_http_server: whether to start a http server with runtime metrics. [will be deprecated soon] |
| 34 | Learn more about Pathway Live Data Framework monitoring in a |
| 35 | `tutorial </developers/user-guide/deployment/pathway-monitoring/>`_ . |
| 36 | default_logging: whether to allow pathway to set its own logging handler. Set |
| 37 | it to False if you want to set your own logging handler. |
| 38 | persistence_config: the config for persisting the state in case this |
| 39 | persistence is required. |
| 40 | runtime_typechecking: enables additional strict type checking at runtime |
| 41 | terminate_on_error: whether to terminate the computation if the data/user-logic error occurs |
| 42 | max_expression_batch_size: the maximal number of rows for which the expressions |
| 43 | are computed at once. You might want to decrease it if the intermediate state |
| 44 | in one of your expressions is large. |
| 45 | event_loop: an externally created event loop to use for the duration of the run. |
| 46 | If not specified, a new event loop is created and closed automatically. |
| 47 | When running the graph multiple times with async UDFs that use ``InMemoryCache``, |
| 48 | the same event loop must be provided to all runs to avoid runtime errors. |
| 49 | """ |
| 50 | GraphRunner( |
| 51 | parse_graph.G, |
| 52 | debug=debug, |
| 53 | monitoring_level=monitoring_level, |
| 54 | with_http_server=with_http_server, |
| 55 | default_logging=default_logging, |
| 56 | persistence_config=persistence_config, |
| 57 | runtime_typechecking=runtime_typechecking, |
| 58 | terminate_on_error=terminate_on_error, |
| 59 | max_expression_batch_size=max_expression_batch_size, |
| 60 | event_loop=event_loop, |
| 61 | _stacklevel=4, |
| 62 | ).run_outputs() |
| 63 | |
| 64 | |
| 65 | @check_arg_types |
nothing calls this directly
no test coverage detected