orbit.utils package

Submodules

orbit.utils.general module

orbit.utils.general.get_parent_path(current_file_path)
Parameters
  • current_file_path (str) – The given file path, should be an absolute path

  • Returns

  • ------- – str : The parent path of give file path

orbit.utils.general.is_empty_dataframe(df)

A simple function to tell whether the passed in df is an empty dataframe or not. :param df: given input dataframe :type df: pd.DataFrame

Returns

  • boolean

  • True if df is none, or if df is an empty dataframe; False otherwise.

orbit.utils.general.is_even_gap_datetime(array)

Returns True if array is evenly distributed

orbit.utils.general.is_ordered_datetime(array)

Returns True if array is ordered and non-repetitive

orbit.utils.general.update_dict(original_dict, append_dict)

orbit.utils.pyro module

orbit.utils.pyro.get_pyro_model(model_name)

orbit.utils.stan module

orbit.utils.stan.compile_stan_model(stan_model_name)

Compile stan model and save as pkl

orbit.utils.stan.get_compiled_stan_model(stan_model_name)

Load compiled Stan model

class orbit.utils.stan.suppress_stdout_stderr

Bases: object

A context manager for doing a “deep suppression” of stdout and stderr in Python, i.e. will suppress all print, even if the print originates in a compiled C/Fortran sub-function.

This will not suppress raised exceptions, since exceptions are printed

to stderr just before a script exits, and after the context manager has exited (at least, I think that is why it lets exceptions through).

Module contents