def _WatcherHandler(handler_uuid, of_blob_ptr): uuid2handler = session_ctx.GetDefaultSession().uuid2watch_handler assert handler_uuid in uuid2handler blob_watched, handler = uuid2handler[handler_uuid] assert callable(handler) ndarray_lists = ofblob.OfBlob(of_blob_ptr).CopyToNdarrayLists() local_blob = local_blob_util.MakeLocalBlob(ndarray_lists, blob_watched) handler(oft_util.TransformWatchedBlob(local_blob, handler))
def PullCallback(of_blob): self.result_ = local_blob_util.MakeLocalBlob( of_blob.CopyToNdarrayLists(), self.consistent_blob_) pull_cb()