コード例 #1
0
 def _get_pickle_filename_root(self, name):
     filename_root = build_data_filename(
         output_directory=self._output_directory,
         runner_name=self.dynamic_runner_name(),
         experiment_name=self._experiment_name,
         df_name=name)
     return filename_root
コード例 #2
0
    def _dump_df_to_disk(self, df, df_name):
        filename_root = build_data_filename(output_directory=self._output_directory,
                                            runner_name=self.runner_name(),
                                            experiment_name=self._experiment_name,
                                            df_name=df_name)

        pk.dump(df, open(f'{filename_root}.p', "wb"))
        df.to_csv(f'{filename_root}.csv')
コード例 #3
0
ファイル: _runner_base.py プロジェクト: shomik/mlrose
    def _dump_pickle_to_disk(self, object_to_pickle, name):
        if self._output_directory is None:
            return
        filename_root = build_data_filename(
            output_directory=self._output_directory,
            runner_name=self.dynamic_runner_name(),
            experiment_name=self._experiment_name,
            df_name=name)

        pk.dump(object_to_pickle, open(f'{filename_root}.p', "wb"))
        print(f'Saving: [{filename_root}.p]')
        return filename_root