When saving large graph, creating a temporary folder will cause the system disk resources to be exhausted.
Opened this issue · 1 comments
Deleted user commented
with tempfile.TemporaryDirectory() as temp_dir:
joblib.dump(self, os.path.join(temp_dir, self.f_model), compress=True)
with open(os.path.join(temp_dir, self.f_mdata), 'w') as f:
json.dump(meta_data, f)
filename = shutil.make_archive(filename, 'zip', temp_dir)
It should be written directly to the destination.
VHRanger commented
Can you explain the issue in more detail?