Skip to content

Commit

Permalink
Removing the check about the size re: ray-project#3450 (ray-project#3464
Browse files Browse the repository at this point in the history
)

* Removing the check about the size re: ray-project#3450

* Addressing comments

* Update services.py
  • Loading branch information
devin-petersohn authored and pcmoritz committed Dec 7, 2018
1 parent 7a7c6e5 commit 970babf
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions python/ray/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,9 +1028,6 @@ def determine_plasma_store_config(object_store_memory=None,
"when calling ray.init() or ray start.")
object_store_memory = MAX_DEFAULT_MEM

if plasma_directory is not None:
plasma_directory = os.path.abspath(plasma_directory)

# Determine which directory to use. By default, use /tmp on MacOS and
# /dev/shm on Linux, unless the shared-memory file system is too small,
# in which case we default to /tmp on Linux.
Expand All @@ -1055,10 +1052,15 @@ def determine_plasma_store_config(object_store_memory=None,
else:
plasma_directory = "/tmp"

# Do some sanity checks.
if object_store_memory > system_memory:
raise Exception("The requested object store memory size is greater "
"than the total available memory.")
# Do some sanity checks.
if object_store_memory > system_memory:
raise Exception(
"The requested object store memory size is greater "
"than the total available memory.")
else:
plasma_directory = os.path.abspath(plasma_directory)
logger.warning("WARNING: object_store_memory is not verified when "
"plasma_directory is set.")

if not os.path.isdir(plasma_directory):
raise Exception("The file {} does not exist or is not a directory."
Expand Down

0 comments on commit 970babf

Please sign in to comment.