Skip to content

Commit

Permalink
Add debug log for serialized object size (ray-project#35992)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiajun Yao <[email protected]>
  • Loading branch information
jjyao authored Jun 2, 2023
1 parent 4c2b14d commit 7dcc28b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/ray/_raylet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2891,7 +2891,6 @@ cdef class CoreWorker:
CObjectID c_object_id = object_ref.native()
shared_ptr[CBuffer] data_buf
shared_ptr[CBuffer] metadata_buf
int64_t put_threshold
unique_ptr[CAddress] c_owner_address = move(self._convert_python_address(
object_ref.owner_address()))

Expand Down Expand Up @@ -2934,13 +2933,11 @@ cdef class CoreWorker:
CObjectID c_object_id
shared_ptr[CBuffer] data
shared_ptr[CBuffer] metadata
int64_t put_threshold
unique_ptr[CAddress] c_owner_address
c_vector[CObjectID] contained_object_ids
c_vector[CObjectReference] contained_object_refs

metadata = string_to_buffer(serialized_object.metadata)
put_threshold = RayConfig.instance().max_direct_call_object_size()
total_bytes = serialized_object.total_bytes
contained_object_ids = ObjectRefsToVector(
serialized_object.contained_object_refs)
Expand All @@ -2949,6 +2946,9 @@ cdef class CoreWorker:
contained_object_ids,
&c_object_id, &data, True, owner_address, inline_small_object)

logger.debug(
f"Serialized object size of {c_object_id.Hex()} is {total_bytes} bytes")

if not object_already_exists:
if total_bytes > 0:
(<SerializedObject>serialized_object).write_to(
Expand Down

0 comments on commit 7dcc28b

Please sign in to comment.