Skip to content

Commit

Permalink
libraylib -> lib (ray-project#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadn authored and robertnishihara committed Jul 28, 2016
1 parent c369509 commit 4c323d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/python/ray/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def get_object(self, objref):
"""
if ray.lib.is_arrow(self.handle, objref):
## this is the new codepath
buff, segmentid, metadata_offset = ray.libraylib.get_buffer(self.handle, objref)
buff, segmentid, metadata_offset = ray.lib.get_buffer(self.handle, objref)
metadata_size = np.frombuffer(buff, dtype="int64", count=1)[0]
metadata = np.frombuffer(buff, dtype="byte", offset=8, count=metadata_size)
data = np.frombuffer(buff, dtype="byte")[8 + metadata_size:]
Expand Down
6 changes: 3 additions & 3 deletions test/runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ def testObjStore(self):

# Getting a buffer after modifying it before it finishes should return updated buffer
objref = ray.lib.get_objref(w1.handle)
buf = ray.libraylib.allocate_buffer(w1.handle, objref, 100)
buf = ray.lib.allocate_buffer(w1.handle, objref, 100)
buf[0][0] = 1
ray.libraylib.finish_buffer(w1.handle, objref, buf[1], 0)
completedbuffer = ray.libraylib.get_buffer(w1.handle, objref)
ray.lib.finish_buffer(w1.handle, objref, buf[1], 0)
completedbuffer = ray.lib.get_buffer(w1.handle, objref)
self.assertEqual(completedbuffer[0][0], 1)

ray.services.cleanup()
Expand Down

0 comments on commit 4c323d4

Please sign in to comment.