Commit graph

689 commits

Author SHA1 Message Date
Philipp Moritz
58e8bbcb34 Fix bug in serializing arguments of tasks that are more complex objects (#72)
* Give more informative error message when we do not know how to serialize a class.

* Check that passing arguments to remote functions and getting them does not change their values.

* fix serialization bug

* fix tests for common module

* Formatting.

* Bug fix in init_pickle_module signature.

* Use pickle with HIGHEST_PROTOCOL.
2016-11-30 23:21:53 -08:00
atumanov
1499834be1 handling partial/interrupted I/O (#69)
* read_bytes: handle EINTR + easier flow

* addressing whitespace + style comments

* handling partial i/o: write_bytes; use [read|write]_bytes in plasma send/receive
2016-11-29 23:04:13 -08:00
Philipp Moritz
a2692ead6e add errno logging for fatal checks (#68) 2016-11-29 22:40:01 -08:00
mehrdadn
4d327c571a Make Redis script executable (#66) 2016-11-29 14:33:20 -08:00
Robert Nishihara
2c639c05ef When searching for Python with cmake, try custom tricks before using default cmake behavior. (#67)
* Change CMakeLists.txt.

* remove dead code
2016-11-29 14:32:54 -08:00
Philipp Moritz
c7073d623b Object table subscribe with new semantics (#62)
* new plasma subscribe implementation

* object table subscribe with test

* clang-format

* fix

* fix test

* fix tests

* fix clang-format

* add check

* final clang-format

* final fixes

* fix clang-format
2016-11-27 21:26:23 -08:00
Robert Nishihara
bc1d7db926 Re-enable fetch tests. (#63)
* Bring back fetch tests.

* Zero initialize success array in PyPlasma_fetch.

* Fix bug in fetch in case where the object ID doesn't have any managers in the object table.

* Temporarily disallow calling fetch with multiple copies of the same object ID.

* Fix.

* Factor out code for checking if list of object IDs are all distinct.

* Remove commented out code.

* Fix.
2016-11-24 16:27:17 -08:00
Wapaul1
800bf8deb3 Redis Server started in Tests now shutdowns at end of tests (#61)
Redis Server started in tests now shutdowns at end of tests.
2016-11-23 21:47:53 -08:00
Philipp Moritz
8147b62964 move methods related to plasma requests and replies to plasma.c (#60) 2016-11-23 21:13:19 -08:00
Robert Nishihara
1f9fce8e53 Remove semicolon in macro. (#59) 2016-11-23 00:54:07 -08:00
mehrdadn
7237ec4124 Windows compatibility (#57)
* Add Python and Redis submodules, and remove old third-party modules

* Update VS projects (WARNING: references files that do not exist yet)

* Update code & add shims for APIs except AF_UNIX/{send,recv}msg()

* Minor style changes.
2016-11-22 17:04:24 -08:00
Robert Nishihara
a93c6b7596 Quick workaround for ray.wait bug. (#42) 2016-11-22 13:31:22 -08:00
mehrdadn
35ce5f8001 Enable more warnings and fix usleep() issue (#55)
* Enable more warnings and fix usleep() issue

* Periods after comments.
2016-11-22 00:29:27 -08:00
mehrdadn
3714984094 Remove Redis version from Linux scripts (#56)
* Remove Redis version from Linux scripts

* Add documentation.
2016-11-21 15:02:40 -08:00
Robert Nishihara
4b00c029ac Remove numbuf from requirements for setup.py. (#54)
* Remove numbuf from requirements for setup.py.

* Update documentation.
2016-11-21 14:30:17 -08:00
Philipp Moritz
da6bcfcc70 Statically link arrow libraries when building numbuf (#53)
* Fix numbuf compilation on Linux

* Statically link arrow libraries when building numbuf.

* Last fixes.
2016-11-21 02:14:13 -08:00
Robert Nishihara
9ed56c23db Fix pip install hanging by moving C tests out of build.sh. (#52)
* Remove C tests from build.sh.

* Run C tests in Travis.
2016-11-20 21:02:54 -08:00
Robert Nishihara
f267da6aa8 Improve case on Mac where cmake fails to find Python with the custom search path. (#49)
* On Mac OS X, if cmake fails to find Python with custom search path, default to using find_package.

* Fix formatting in CMakeLists.txt.

* Set CUSTOM_PYTHON_EXECUTABLE variable on mac if the custom search path fails.

* Require exact Python version match.

* Use cmake mode keyword for logging messages.

* Fix.

* Find python libraries in cmake by searching near the include directories.

* Update cmakelists for numbuf.
2016-11-19 19:00:42 -08:00
Robert Nishihara
c9757a6fd0 Merge pull request #48 from ray-project/numbuf-integration
Numbuf integration
2016-11-19 18:10:53 -08:00
Philipp Moritz
d64f69f215 switch from submodule to cloning arrow, travis fixes & Robert's comments 2016-11-19 17:38:36 -08:00
Philipp Moritz
05e0226047 clang-fixes 2016-11-19 14:27:08 -08:00
Philipp Moritz
9d6da1281e add clang-format for numbuf (arrow style) 2016-11-19 12:56:11 -08:00
Philipp Moritz
0b888c38f1 Merge numbuf. 2016-11-19 12:30:01 -08:00
Robert Nishihara
c8c3983195 Use sizeof(field) instead of sizeof(type) and other fixes. (#47)
* Use sizeof(field) instead of sizeof(type) and other fixes.

* Fix formatting.

* Bug fix.

* Zero-initialize structs. There are many more instances of these that I haven't changed yet.

* Bug fix.

* Revert from atexit to signaling to fix valgrind tests.

* Address Philipp's comments.
2016-11-19 12:19:49 -08:00
Philipp Moritz
c3ab68e88c Rebase numbuf to latest arrow (#23)
* rebase to latest arrow

* fix arrow linking

* finish rebase

* point arrow to pcmoritz's arrow

* fix

* fix macOS

* fix
2016-11-19 02:27:21 -08:00
Robert Nishihara
d77b685a90 Global scheduler skeleton (#45)
* Initial scheduler commit

* global scheduler

* add global scheduler

* Implement global scheduler skeleton.

* Formatting.

* Allow local scheduler to be started without a connection to redis so that we can test it without a global scheduler.

* Fail if there are no local schedulers when the global scheduler receives a task.

* Initialize uninitialized value and formatting fix.

* Generalize local scheduler table to db client table.

* Remove code duplication in local scheduler and add flag for whether a task came from the global scheduler or not.

* Queue task specs in the local scheduler instead of tasks.

* Simple global scheduler tests, including valgrind.

* Factor out functions for starting processes.

* Fixes.
2016-11-18 19:57:51 -08:00
Wapaul1
08707f9408 Integration of Webui with Ray (#32)
* Initial integration of webui with ray

* Re-organized calling of build-webui in setup.py

* Fixed Lint comments on js code

* Fixed more lint issues

* Fixed various issues

* Fixed directory in services.py

* Small changes.

* Changes to match lint
2016-11-17 22:33:29 -08:00
Robert Nishihara
c3db225cbe Patch arrow to work with xcode 8. This will be unecessary when we rebase on an updated arrow. (#22) 2016-11-16 19:43:26 -08:00
Stephanie Wang
7babe0d22f Logging level (#38)
* Set logging levels in Makefile using -DRAY_COMMON_LOG_LEVEL=level

* Lower level of some LOG_ERROR messages, log the name of the table operation on failure

* Address rest of Robert's comments

* Fix spurious log message
2016-11-15 20:33:29 -08:00
Philipp Moritz
986ed5c9e8 Plasma C extensions (#34)
* switch plasma from ctypes to python C API

* clang-format

* various fixes
2016-11-13 16:23:28 -08:00
Robert Nishihara
ad6a401740 Get rid of old git submodule init calls. (#41) 2016-11-13 14:55:28 -08:00
Robert Nishihara
43aba4fc6d Install python package dependencies through setup.py. (#39)
* Install python package dependencies through setup.py.

* Do pip installs without sudo.

* Clearer instructions for running tests.

* Wording.
2016-11-12 19:37:20 -08:00
Robert Nishihara
488f881d70 Install numpy before building numbuf in setup.py. (#20) 2016-11-12 19:36:47 -08:00
Philipp Moritz
d26fbcebbe switch to release mode (#19) 2016-11-12 19:35:46 -08:00
Robert Nishihara
28a80ca058 Remove out-of-date documentation. (#40) 2016-11-12 19:34:22 -08:00
Robert Nishihara
5c89a7ab4e Fix bug in which gym environment could not be imported because of module naming conflicts. (#37) 2016-11-11 19:02:40 -08:00
Philipp Moritz
b1083e92e9 fix bug in wait (#35) 2016-11-11 17:05:40 -08:00
Robert Nishihara
336a904404 Implement repr, hash, and richcompare for ObjectIDs. (#33)
* Implement repr, hash, and richcompare for ObjectIDs.

* Addressing comments.

* Partially fix example applications.
2016-11-11 09:18:36 -08:00
Stephanie Wang
9d1e750e8f Merge task table and task log into a single table (#30)
* Merge task table and task log

* Fix test in db tests

* Address Robert's comments and some better error checking

* Add a LOG_FATAL that exits the program
2016-11-10 18:13:26 -08:00
Robert Nishihara
194bdb1d96 Compute task IDs and object IDs deterministically. (#31)
* Put infrastructure in place to compute task IDs and object IDs.

* Fix version number for common library.

* Compute task IDs and object IDs deterministically.

* Address Stephanie's comments.

* Update task documentation.

* Fix formatting.

* Add more tests and checks.

* Fix formatting.

* Enable DCHECKs and change CHECKs to DCHECKs.
2016-11-08 14:46:34 -08:00
Robert Nishihara
90f88af902 Fix bug in which worker import counters were treated incorrectly. (#28)
* Fix bug in which worker import counters were treated incorrectly.

* Fix bug in which cached functions-to-run were double counted as exports. This also runs the functions-to-run on the driver only after ray.init is called.

* Only define reusable variables locally after ray.init has been called.

* Remove flaky reference counting tests. It's not clear that these tests make sense.

* Make numbuf pip install verbose.

* Export cached reusable variables before cached remote functions.

* Fix bug causing the worker to hang sometimes. This happens when the worker is trying to run a task, but it hasn't imported enough imports to run the task, so it continually acquires and releases a lock while checking if it has enough imports. However, for some reason, the import thread is waiting to acquire the same lock and never does so (or takes a very long time to do so). By dropping the lock before sleeping, this makes it easier for other threads to acquire the lock.

* Acquire locks using 'with' statements.

* Fix possible test failure.

* Try to start Redis multiple times with different random ports if the original attempt failed.

* Fix test in which we redefine a remote function.
2016-11-06 22:24:39 -08:00
Philipp Moritz
1147c4d34b Keep objects in cache between tasks (#29)
* fix caching behavior

* fixes
2016-11-06 17:31:14 -08:00
Robert Nishihara
efe8a295ea Add basic LRU eviction for the plasma store. (#26)
* Basic functionality for LRU eviction.

* Test eviction.

* Factor out eviction policy.

* Move delete_object into eviction policy.

* Replace array of released objects with an LRU cache (hash table + doubly linked list).

* Finish rebase on master.

* Move actual object deletion away from eviction policy and into plasma store.

* Small fixes.

* Fixes.

* Make remove_object_from_lru_cache always remove the object.

* Minor formatting and comments.

* Pass in allowed memory as argument to Plasma store.

* Small fix.
2016-11-05 21:34:11 -07:00
Philipp Moritz
90a2aa4bf7 Various performance improvements (#24)
* switch from array to linked list for photon queue

* performance optimizations

* fix tests

* various fixes
2016-11-04 00:41:20 -07:00
Robert Nishihara
1e2b3ceac9 Fix whitespace. (#27) 2016-11-03 17:36:55 -07:00
Ujval Misra
b370a1df57 Merge sealed_objects and open_objects into a single hashmap (#25)
* Merge sealed_objects and open_objects into a single hashmap

* Entry contains enum that determines whether it is open or closed

* Removed unused variable.

* Applied Robert's patch

* Fixed styling.
2016-11-03 17:33:54 -07:00
Robert Nishihara
5dfd76e0f7 Causes build scripts to fail immediately if a single command fails. (#23) 2016-11-02 20:56:25 -07:00
Robert Nishihara
681ec570ba Remove unnecessary pip installs. (#21)
* Small cleanups in worker.py.

* Remove dependencies on subprocess32, graphviz, protobuf, and ipython.

* Retry starting the plasma manager if the port is in use.

* Whitespace

* Move start_plasma_manager into plasma.py.
2016-11-02 16:40:37 -07:00
Robert Nishihara
072f442c1f Update worker.py and services.py to use plasma and the local scheduler. (#19)
* Update worker code and services code to use plasma and the local scheduler.

* Cleanups.

* Fix bug in which threads were started before the worker mode was set. This caused remote functions to be defined on workers before the worker knew it was in WORKER_MODE.

* Fix bug in install-dependencies.sh.

* Lengthen timeout in failure_test.py.

* Cleanups.

* Cleanup services.start_ray_local.

* Clean up random name generation.

* Cleanups.
2016-11-02 00:39:35 -07:00
Philipp Moritz
2068587af8 Fix socket bind collisions in manager_tests, race condition bind/listen/subscribe and memory leaks (#18)
* Fix socket bind collisions in manager_tests

* bind manager sockets before connecting to the store

* fix memory leak in tests

* fix valgrind early process termination

* fix bind/listen/subscribe race condition

* fix photon

* fix other tests

* make it that all of common is tested

* fix clang-format

* fix
2016-11-02 00:09:04 -07:00