:py:mod:`httpstan.services_stub` ================================ .. py:module:: httpstan.services_stub .. autoapi-nested-parse:: Call and process output of stan::services functions. Functions here perform the menial task of calling (from Python) a named C++ function in stan::services given a specific Stan model. The output of the stan::services function is routed from stan::callbacks writers into Python via a Unix domain socket. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: httpstan.services_stub.init_worker httpstan.services_stub._make_lazy_function_wrapper_helper httpstan.services_stub._make_lazy_function_wrapper httpstan.services_stub.call Attributes ~~~~~~~~~~ .. autoapisummary:: httpstan.services_stub.executor httpstan.services_stub.logger .. py:function:: init_worker() -> None .. py:data:: executor .. py:data:: logger .. py:function:: _make_lazy_function_wrapper_helper(function_basename: str, model_name: str, *args: Any, **kwargs: Any) -> Callable .. py:function:: _make_lazy_function_wrapper(function_basename: str, model_name: str) -> Callable .. py:function:: call(function_name: str, model_name: str, fit_name: str, logger_callback: Optional[Callable] = None, **kwargs: dict) -> None :async: Call stan::services function. Yields (asynchronously) messages from the stan::callbacks writers which are written to by the stan::services function. This is a coroutine function. :param function_name: full name of function in stan::services :param services_module: model-specific services extension module :type services_module: module :param fit_name: Name of fit, used for saving length-prefixed messages :param logger_callback: Callback function for logger messages, including sampling progress messages :param kwargs: named stan::services function arguments, see CmdStan documentation.