inspect_serializability#

ray.util.inspect_serializability(base_obj: Any, name: str | None = None, depth: int = 3, print_file: Any | None = None) Tuple[bool, Set[FailureTuple]][source]#

Identifies what objects are preventing serialization.

Parameters:
  • base_obj (Any) – Object to be serialized.

  • name (str | None) – Optional name of string.

  • depth (int) – Depth of the scope stack to walk through. Defaults to 3.

  • print_file (Any | None) – file argument that will be passed to print().

Returns:

True if serializable. set[FailureTuple]: Set of unserializable objects.

Return type:

bool

Added in version 1.1.0.

DeveloperAPI: This API may change across minor Ray releases.