[object spilling] Autocreate dir if not exists (#11999)

This commit is contained in:
Eric Liang
2020-11-13 12:13:06 -08:00
committed by GitHub
parent f936ea35fe
commit 00ef1179c0
2 changed files with 2 additions and 8 deletions
+2 -1
View File
@@ -77,9 +77,10 @@ class FileSystemStorage(ExternalStorage):
def __init__(self, directory_path):
self.directory_path = directory_path
self.prefix = "ray_spilled_object_"
os.makedirs(self.directory_path, exist_ok=True)
if not os.path.exists(self.directory_path):
raise ValueError("The given directory path to store objects, "
f"{self.directory_path}, doesn't exist.")
f"{self.directory_path}, could not be created.")
def spill_objects(self, object_refs):
keys = []