def __save_output(self, iteration):
    folder_name = ((Path(os.getcwd()) / 'models') / 'snapshots')
    if (not os.path.exists(folder_name)):
        os.makedirs(folder_name)
    F_full_path = (folder_name / f'F-samples--{self.uid}--{iteration}')
    F_samples_array = np.asarray(self.f_sampler.samples)
    if (F_samples_array.shape[0] > 0):
        np.save(F_full_path, F_samples_array[::self.hmc_thinning, :])
    beta_full_path = (folder_name / f'beta-samples--{self.uid}--{iteration}')
    beta_array = np.asarray(self.beta_sampler.samples)
    if (beta_array.shape[0] > 0):
        np.save(beta_full_path, beta_array[::self.hmc_thinning, :])
    Z_full_path = (folder_name / f'Z-samples--{self.uid}--{iteration}')
    Z_array = np.asarray(self.Z_samples)
    if (Z_array.shape[0] > 0):
        np.save(Z_full_path, Z_array[::self.hmc_thinning, :])
def __save_output(self, iteration):
    folder_name = ((Path(os.getcwd()) / 'models') / 'snapshots')
    if (not os.path.exists(folder_name)):
        os.makedirs(folder_name)
    F_full_path = (folder_name / f'F-samples--{self.uid}--{iteration}')
    F_samples_array = np.asarray(self.f_sampler.samples)
    if (F_samples_array.shape[0] > 0):
        np.save(F_full_path, F_samples_array[::self.hmc_thinning, :])
    beta_full_path = (folder_name / f'beta-samples--{self.uid}--{iteration}')
    beta_array = np.asarray(self.beta_sampler.samples)
    if (beta_array.shape[0] > 0):
        np.save(beta_full_path, beta_array[::self.hmc_thinning, :])
    Z_full_path = (folder_name / f'Z-samples--{self.uid}--{iteration}')
    Z_array = np.asarray(self.Z_samples)
    if (Z_array.shape[0] > 0):
        np.save(Z_full_path, Z_array[::self.hmc_thinning, :])