[Core] Fix override memory and object_store_memory in decorator (#10563)

This commit is contained in:
Alex Wu
2020-09-06 20:56:48 -07:00
committed by GitHub
parent 8906c1a59f
commit a699f6a4d8
3 changed files with 32 additions and 6 deletions
+4 -3
View File
@@ -365,9 +365,10 @@ def resources_from_resource_arguments(
elif default_num_gpus is not None:
resources["GPU"] = default_num_gpus
memory = default_memory or runtime_memory
object_store_memory = (default_object_store_memory
or runtime_object_store_memory)
# Order of arguments matter for short circuiting.
memory = runtime_memory or default_memory
object_store_memory = (runtime_object_store_memory
or default_object_store_memory)
if memory is not None:
resources["memory"] = ray_constants.to_memory_units(
memory, round_up=True)