:py:mod:`httpstan.fits` ======================= .. py:module:: httpstan.fits .. autoapi-nested-parse:: Helper functions for Stan fits. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: httpstan.fits.calculate_fit_name .. py:function:: calculate_fit_name(function: str, model_name: str, kwargs: dict) -> str Calculate fit name from parameters and data. If a random seed is provided, a fit is a deterministic function of the model, data, and parameters. If no random seed is provided, this function returns a random string. If a random seed is provided, a fit id is a hash of the concatenation of binary representations of the arguments to ``services_stub.call`` (type, model, kwargs): - UTF-8 encoded name of service function (e.g., ``hmc_nuts_diag_e_adapt``) - UTF-8 encoded Stan model name (which is derived from a hash of ``program_code``) - Bytes of pickled kwargs dictionary - UTF-8 encoded string recording the httpstan version - UTF-8 encoded string identifying the system platform - UTF-8 encoded string identifying the system bit architecture - UTF-8 encoded string identifying the Python version - UTF-8 encoded string identifying the Python executable :param function: name of service function :param model_name: Stan model name :param kwargs: kwargs passed to service function :returns: fit name :rtype: str