Commit graph

1664 commits

Author SHA1 Message Date
Robert Nishihara
6172f94c04 Implement Python global state API for xray. (#2125)
* Implement global state API for xray.

* Fix object table.

* Fixes for log structure.

* Implement cluster_resources.

* Add driver task to task table.

* Remove python flatbuffers code

* Get some global state API tests running.

* Python linting.

* Fix linting.

* Fix mock modules for doc

* Copy over flatbuffer bindings.

* Fix for tests.

* Linting

* Fix monitor crash.
2018-05-29 16:25:54 -07:00
Stephanie Wang
166000b089
[xray] Improve flush algorithm for the lineage cache (#2130)
* Private method to flush a single task from the lineage cache

* Track parent->child relationships for faster flushing

* doc

* Only flush the newly ready task

* Flush() returns void

* x
2018-05-28 21:03:15 -07:00
Eric Liang
bc2a83e698 Fix support for actor classmethods (#2146) 2018-05-28 17:43:23 -07:00
Peter Veerman
eb1d7ac4bc Add empty df test (#1879) 2018-05-27 09:25:50 -07:00
Yujie Liu
a8d3c057c1 [JavaWorker] Enable java worker support (#2094)
* Enable java worker support
--------------------------
This commit includes a tailored version of the Java worker implementation from Ant Financial.
The changes for build system, python module, src module and arrow are in other commits, this commit consists of the following modules:
 - java/api: Ray API definition
 - java/common: utilities
 - java/hook: binary rewrite of the Java byte-code for remote execution
 - java/runtime-common: common implementation of the runtime in worker
 - java/runtime-dev: a pure-java mock implementation of the runtime for fast development
 - java/runtime-native: a native implementation of the runtime
 - java/test: various tests

Contributors for this work:
 Guyang Song, Peng Cao, Senlin Zhu,Xiaoying Chu, Yiming Yu, Yujie Liu, Zhenyu Guo

* change the format of java help document from markdown to RST

* update the vesion of Arrow for java worker

* adapt the new version of plasma java client from arrow which use byte[] instead of custom type

* add java worker test to ci

* add the example module for better usage guide
2018-05-26 14:38:50 -07:00
Devin Petersohn
74cca3b284 [DataFrame] Fixing the code formatting of the tests (#2123)
* Fixing the code formatting of the tests

* Fixing tests and removing from_pandas

* Addressing comment

* Addressing comments

* Fix lint
2018-05-26 11:24:01 -07:00
Robert Nishihara
dc03506108 Update resource documentation (remove outdated limitations). (#2022) 2018-05-25 22:19:47 -07:00
caopeng428
bb8bfce403 bugfix: use array redis_primary_addr out of its scope (#2139) 2018-05-25 21:40:23 -07:00
Yuhong Guo
a8517cc82a Fix infinite retry in Push function. (#2133) 2018-05-25 01:16:44 -07:00
Yujie Liu
5c2b2c7b49 [JavaWorker] Changes to the directory under src for support java worker (#2093)
* Changes to the directory under src for support java worker
--------------------------
This commit includes changes to the directory under src, which is part of the java worker support of Ray.
It consists of the following changes:
 src/common/task.cc - just fix null point problem
 org_ray_spi_impl_DefaultLocalSchedulerClient.* - JNI support for local scheduler client, and the org_ray_spi_impl_DefaultLocalSchedulerClient.cc file is not autogenerated
2018-05-25 00:59:05 -07:00
Zongheng Yang
fa97acbc89 Integrate credis with Ray & route task table entries into credis. (#1841) 2018-05-24 23:35:25 -07:00
Yucong He
3509a33cf3 Prototype named actors. (#2129) 2018-05-24 00:32:12 -07:00
Philipp Moritz
225608ec66 Update arrow to latest master (#2100) 2018-05-24 00:26:13 -07:00
Peter Schafhalter
68b11c8251 [DataFrame] Speed up dtypes (#2118)
* Don't recreate _block_partitions in _correct_dtypes

Further dtypes performance optimizations

Fix bugs

Redesign speedup

Address feedback

* Remove _correct_column_dtypes
2018-05-23 16:35:17 -07:00
yuyiming
9ff3d57429 do not fetch from dead Plasma Manager (#2116) 2018-05-23 16:13:09 -07:00
Kunal Gosar
4584193308 [DataFrame] Refactor GroupBy Methods and Implement Reindex (#2101)
* fix 1D blocks case

* Add groupby test code

* begin writing tests

* Fix bug on groupby(axis=1, ...)

* implement reindex

* fix index misalignment after groupby

* fix df.apply bug

* fix groupby.apply

* fix agg funcs

* finish groupby tests

* finish test suite for groupby

* fixing lint

* undo new line

* fix python2 index copy bug

* Concat Series into ray.df

* fixing python2 issues

* resolving all python 2 tests

* handle multiindex on apply

* resolve comments

* updating docstring

* fix lint

* fix lint again

* address comments
2018-05-22 16:34:07 -07:00
Richard Liaw
01f69689ed Initial Support for Airspeed Velocity (#2113)
* asv init

* move asv

* init benchmarks

* small changes

* running basics

* ok done

* readme

* ok

* update

* linting

* linting

* linting

* linting

* Update and rename README-benchmarks.md to README-benchmarks.rst

* Update benchmarks.py

* linting
2018-05-22 16:20:39 -07:00
Robert Nishihara
9b9ff19dd0 Use automatic memory management in Redis modules. (#1797) 2018-05-22 01:05:09 -07:00
Devin Petersohn
317c9450e7 [DataFrame] Test bugfixes (#2111) 2018-05-21 23:01:19 -07:00
Peter Schafhalter
f1fc373de7 [DataFrame] Update initializations of IndexMetadata which use outdated APIs (#2103)
* Update calls which use outdated APIs

* Fix lengths of IndexMetadata
2018-05-21 09:19:41 -10:00
eric-jj
eb078766d8 Performance fix (#2110) 2018-05-20 18:07:55 -07:00
Alok Singh
f795173b51 Use flake8-comprehensions (#1976)
* Add flake8 to Travis

* Add flake8-comprehensions

[flake8 plugin](https://github.com/adamchainz/flake8-comprehensions) that
checks for useless constructions.

* Use generators instead of lists where appropriate

A lot of the builtins can take in generators instead of lists.

This commit applies `flake8-comprehensions` to find them.

* Fix lint error

* Fix some string formatting

The rest can be fixed in another PR

* Fix compound literals syntax

This should probably be merged after #1963.

* dict() -> {}

* Use dict literal syntax

dict(...) -> {...}

* Rewrite nested dicts

* Fix hanging indent

* Add missing import

* Add missing quote

* fmt

* Add missing whitespace

* rm duplicate pip install

This is already installed in another file.

* Fix indent

* move `merge_dicts` into utils

* Bring up to date with `master`

* Add automatic syntax upgrade

* rm pyupgrade

In case users want to still use it on their own, the upgrade-syn.sh script was
left in the `.travis` dir.
2018-05-20 16:15:06 -07:00
Robert Nishihara
99ae74e1d2 Improve error message printing and suppression. (#2104) 2018-05-20 12:13:14 -07:00
Eric Liang
f37e2e5d2f
[rllib] [doc] Broken link in ddpg doc 2018-05-20 00:10:59 -07:00
Alok Singh
9a8f29e571 YAPF, take 3 (#2098)
* Use pep8 style

The original style file is actually just pep8 style, but with everything
spelled out. It's easier to use the `based_on_style` feature. Any overrides are
clearer that way.

* Improve yapf script

1. Do formatting in parallel
2. Lint RLlib
3. Use .style.yapf file

* Pull out expressions into variables

* Don't format rllib

* Don't allow splits in dicts

* Apply yapf

* Disallow single line if-statements

* Use arithmetic comparison

* Simplify checking for changed files

* Pull out expr into var
2018-05-19 16:07:28 -07:00
Alok Singh
8e0962bb9c [rllib] rename async -> _async (#2097)
async and await are reserved words in Python 3.7, and will give a syntax error.
2018-05-19 14:16:52 -07:00
Kunal Gosar
eba73449cc fix unused lambda capture (#2102) 2018-05-19 13:27:10 -07:00
Melih Elibol
f1da721522
[xray] Use pubsub instead of timeout for ObjectManager Pull. (#2079)
Use pubsub instead of timeout for Pull.
2018-05-18 21:35:12 -07:00
Peter Schafhalter
9e46de9830 [DataFrame] Update _inherit_docstrings (#2085)
* Update _inherit_docstrings

* Add groupby __init__
2018-05-18 17:50:41 -10:00
Yujie Liu
5918776dd4 [JavaWorker] Changes to the build system for support java worker (#2092)
* Changes to the build system for support java worker
--------------------------
This commit includes changes to the build system, which is part of the java worker support of Ray.
It consists of the following changes:
 - the changes of CMakeLists.txt files
 - the changes of the python setup.py and init files for the adaptation of the changed build system
 - move the location of local_scheduler_extension.cc for the adaptation of the changed build system which maybe better support multi-language worker

* minor whitespace

* Linting
2018-05-18 19:09:23 -07:00
Stephanie Wang
71e5cca59f
[xray] Fix bug in updating actor execution dependencies (#2064)
* [xray] FIX: bugs in actor execution

* comments

* Stronger check
2018-05-18 12:45:17 -07:00
Simon Mo
0b07602c89 [DataFrame] Refactor __delitem__ (#2080)
* Implement the bug fix

* Fix flake8
2018-05-18 08:58:20 -10:00
Melih Elibol
25e7aa1e79 [xray] Better error messaging when pulling from self. (#2068)
* complain more loudly when object pulls from self.

* Add checks for node manager, and internal checks for object manager.

* linting
2018-05-18 10:26:47 -07:00
Adam Gleave
57419f9132 Use source code in hash where possible (fix #2089) (#2090) 2018-05-18 09:05:33 -07:00
Robert Nishihara
78e4b021ab Functions for flushing done tasks and evicted objects. (#2033) 2018-05-18 01:59:58 -07:00
Robert Nishihara
15b72f9893 Fix compilation error for RAY_USE_NEW_GCS with latest clang. (#2086) 2018-05-17 23:10:02 -07:00
Melih Elibol
3c245f66d4 [xray] Corrects Error Handling During Push and Pull. (#2059)
* Makes bad status during Pull non-fatal.
Makes a bad status during Push fatal.

* pretty logs

* Stephanie's feedback.
2018-05-17 17:51:55 -07:00
Stephanie Wang
6ca122f723 [xray] Sophisticated task dependency management (#2035) 2018-05-17 17:18:30 -07:00
Adam Gleave
470887c2ad Support calling positional arguments by keyword (fix #998) (#2081) 2018-05-17 16:10:26 -07:00
Kunal Gosar
afbb260ca4 [DataFrame] Improve performance of iteration methods (#2026)
* fix iterrows

* make iteration methods performant

* resolving comments

* remove indexing from iterator

* switch to iterator syntax
2018-05-17 11:45:21 -10:00
Peter Schafhalter
ae17ebd032 [DataFrame] Implement to_csv (#2014)
* Add map, reduce, merge_dtypes

bug fixes

Unify dtypes on DataFrame creation

Formatting and comments

Cache dtypes

Fix bug in _merge_dtypes

Fix bug

Changed caching logic

Fix dtypes issue in read_csv

Invalidate dtypes cache when inserting column

Simplify unifying dtypes and improve caching

Fix typo

Better caching of dtypes

Fix merge conflicts

Implemented some to_csv functions

Support read_csv from buffers

Expose date_range, NaT, Timedelta from pandas

Add testing utils

Redirect imports to Pandas

Fix imports

Fix read_csv when index_col is specified

Update imports from Pandas

Fix bugs

Use util API

Fix nasty bug

Add missing import

Don't distribute reading of compressed files

Add test utilities for Pandas tests

Add test for to_csv

Add warnings

Fix rebase artifacts

* Fix rebase artifacts

* Fix bugs in read_csv indexing

* Fix bugs in read_csv

* Fix bug for IndexMetadata with _length 1

Remove testing imports

* Rebase artifacts and formatting

* Start to_csv without CSV formatter

* Fix bug in _map_partitions

* Initial implementation for improved to_csv

* Fix bug with insert

* Bugfixes

* Remove CSV Formatter

* Formatting

* Fix python2 bug

* Fix additional python2 issue
2018-05-17 11:35:17 -10:00
Stephanie Wang
796864d887
[xray] Lineage cache only requests notifications about remote parent tasks (#2066)
* Only request notifications about a parent task that is remote

* Fix typo

* Fix lineage cache test
2018-05-17 13:01:40 -07:00
Alok Singh
c0e4c9d3d1 [rllib] Add magic methods for rollouts (#2024) 2018-05-16 22:59:46 -07:00
Kunal Gosar
7549209aea [DataFrame] Allows DataFrame constructor to take in another DataFrame (#2072)
* allow constructor to take in other DataFrame

* rename _data to _frame_data
2018-05-16 16:17:20 -10:00
Peter Schafhalter
78bb887dd4 Pin Pandas version for Travis to 0.22 (#2075) 2018-05-16 15:05:37 -07:00
Melih Elibol
bea97b425b Fix python linting (#2076) 2018-05-16 15:04:31 -07:00
Stephanie Wang
88fa98e851
[xray] Fix GCS table prefixes (#2065)
* Fix GCS table prefixes

* More explicit documentation
2018-05-16 13:15:03 -07:00
Robert Nishihara
570c3153cd Some tests for _submit API. (#2062) 2018-05-16 00:26:25 -07:00
alexbao
68bec0f6fb [rllib] Queue lib for python 2.7 (#2057)
* Queue lib for python 2.7

* use six.moves.queue instead
2018-05-15 15:27:52 -07:00
Eric Liang
3f1dd29eab
[autoscaler] Remove faulty assert that breaks during downscaling, pull configs from env (#2006)
* fixes

* coment out test

* Update ray_constants.py

* Update autoscaler_test.py

* Update ray_constants.py

* lint

* lint
2018-05-15 12:47:11 -07:00