예제 #1
0
    def model_dumper(save_to):
        full_path = Path(save_to) / file_name
        ensure_folder(Path(save_to))
        with open(full_path, "wb") as fout:
            joblib.dump(data, fout, protocol=4)

        model_spec = {"model_type": "joblib", "file_name": file_name}
        return model_spec
    def sgt_model_dumper(save_to):
        full_path = Path(save_to) / file_name
        ensure_folder(Path(save_to))
        with open(full_path, 'wb') as fout:
            joblib.dump(data, fout, protocol=4)

        sgt_model_spec = {'model_type': 'joblib', 'file_name': file_name}
        return sgt_model_spec