mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 18:51:39 +08:00
Introduce constant for ID_SIZE in python code. (#2517)
This commit is contained in:
committed by
Philipp Moritz
parent
64d00ff39e
commit
909d7172b1
@@ -6,6 +6,7 @@ import copy
|
||||
import hashlib
|
||||
import inspect
|
||||
|
||||
import ray.ray_constants as ray_constants
|
||||
import ray.signature
|
||||
|
||||
# Default parameters for remote functions.
|
||||
@@ -37,7 +38,7 @@ def compute_function_id(function):
|
||||
pass
|
||||
# Compute the function ID.
|
||||
function_id = function_id_hash.digest()
|
||||
assert len(function_id) == 20
|
||||
assert len(function_id) == ray_constants.ID_SIZE
|
||||
function_id = ray.ObjectID(function_id)
|
||||
|
||||
return function_id
|
||||
|
||||
Reference in New Issue
Block a user