def get(object_ids):
    """Get a single or a collection of remote objects from the object store.

    This method is identical to `ray.get` except it adds support for tuples,
    ndarrays and dictionaries.

    Args:
        object_ids: Object ID of the object to get, a list, tuple, ndarray of
            object IDs to get or a dict of {key: object ID}.

    Returns:
        A Python object, a list of Python objects or a dict of {key: object}.
    """
    if isinstance(object_ids, (tuple, np.ndarray)):
        return ray.get(list(object_ids))
    elif isinstance(object_ids, dict):
        keys_to_get = [
            k for k, v in object_ids.items() if isinstance(v, ray.ObjectID)
        ]
        ids_to_get = [
            v for k, v in object_ids.items() if isinstance(v, ray.ObjectID)
        ]
        values = ray.get(ids_to_get)

        result = object_ids.copy()
        for key, value in zip(keys_to_get, values):
            result[key] = value
        return result
    else:
        return ray.get(object_ids)
def get ( object_ids ) : if isinstance ( object_ids , ( tuple , np . ndarray ) ) : return ray . get ( list ( object_ids ) ) elif isinstance ( object_ids , dict ) : keys_to_get = [ k for k , v in object_ids . items ( ) if isinstance ( v , ray . ObjectID ) ] ids_to_get = [ v for k , v in object_ids . items ( ) if isinstance ( v , ray . ObjectID ) ] values = ray . get ( ids_to_get ) result = object_ids . copy ( ) for key , value in zip ( keys_to_get , values ) : result [ key ] = value return result else : return ray . get ( object_ids )
Get a single or a collection of remote objects from the object store.

    This method is identical to `ray.get` except it adds support for tuples,
    ndarrays and dictionaries.

    Args:
        object_ids: Object ID of the object to get, a list, tuple, ndarray of
            object IDs to get or a dict of {key: object ID}.

    Returns:
        A Python object, a list of Python objects or a dict of {key: object}.