Commit graph

591 commits

Author SHA1 Message Date
Devin Petersohn
c8c0349511 [DataFrame] Temporarily changing the requirement until our pandas compat is updated (#2197)
* Temporarily changing the requirement until our pandas compat is updated
for 0.23

* Fix lint
2018-06-06 12:01:43 -07:00
Adam Gleave
6ef3b255ea Launch nodes in separate threads (#2183)
Modifies the autoscaler to run launch_new_nodes in a separate thread, keeping track of the number of pending requests.
2018-06-05 20:19:31 -07:00
Richard Liaw
13d4e0db95 Add Docker Support for ASV (#2184)
* added new instructions and script

* initialize ray only once

* use ray-project/asv master
2018-06-05 15:55:35 -07:00
Simon Mo
a139a5df8c [DataFrame] Implement Memoizer (#2157)
* Implement Memoizer

* Add LRUCache

* Add comments
2018-06-05 07:18:12 -07:00
Devin Petersohn
b56c8ed8dc [DataFrame] Fix equals and make it more efficient (#2186)
* Fixing equals

* Adding test fix

* Working on fix for equals and drop

* Fix equals and fix tests to use ray.dataframe.equals

* Addressing comments
2018-06-04 13:10:06 -07:00
Peter Schafhalter
a5d888e49b [DataFrames] More dtypes optimizations (#2124)
* Pass dtypes for some DataFrame constructors

* More optimizations with dtypes_cache

* Optimizations
2018-06-04 10:50:13 -07:00
Binglin Chang
19d6ca0670 Support constructing TensorFlowVariables from multiple tf operations (#2182) 2018-06-02 18:13:52 -07:00
Kunal Gosar
317d0da7d8 Add experimental API for ray.get and ray.wait with additional argument types (#2071) 2018-06-01 16:42:27 -07:00
songqing
4dd4698564 unify build dir for Python and Java (#2171)
* unify build dir for Python and Java

* enable executables auto installed when just running 'make'

* fix plasma_store copy error

* fix cmake error about copying executables

* lint fix

* recover python/setup.py

* enable to copy optional file automatically

* a small fix of path

* lint fix

* lint fix

* lint fix

* Add comment.
2018-06-01 16:28:27 -07:00
Kristian Hartikainen
74dc14d1fc [autoscaler] GCP node provider (#2061)
* Google Cloud Platform scaffolding

* Add minimal gcp config example

* Add googleapiclient discoveries, update gcp.config constants

* Rename and update gcp.config key pair name function

* Implement gcp.config._configure_project

* Fix the create project get project flow

* Implement gcp.config._configure_iam_role

* Implement service account iam binding

* Implement gcp.config._configure_key_pair

* Implement rsa key pair generation

* Implement gcp.config._configure_subnet

* Save work-in-progress gcp.config._configure_firewall_rules.

These are likely to be not needed at all. Saving them if we happen to
need them later.

* Remove unnecessary firewall configuration

* Update example-minimal.yaml configuration

* Add new wait_for_compute_operation, rename old wait_for_operation

* Temporarily rename autoscaler tags due to gcp incompatibility

* Implement initial gcp.node_provider.nodes

* Still missing filter support

* Implement initial gcp.node_provider.create_node

* Implement another compute wait
  operation (wait_For_compute_zone_operation). TODO: figure out if we
  can remove the function.

* Implement initial gcp.node_provider._node and node status functions

* Implement initial gcp.node_provider.terminate_node

* Implement node tagging and ip getter methods for nodes

* Temporarily rename tags due to gcp incompatibility

* Tiny tweaks for autoscaler.updater

* Remove unused config from gcp node_provider

* Add new example-full example to gcp, update load_gcp_example_config

* Implement label filtering for gcp.node_provider.nodes

* Revert unnecessary change in ssh command

* Revert "Temporarily rename tags due to gcp incompatibility"

This reverts commit e2fe634c5d11d705c0f5d3e76c80c37394bb23fb.

* Revert "Temporarily rename autoscaler tags due to gcp incompatibility"

This reverts commit c938ee435f4b75854a14e78242ad7f1d1ed8ad4b.

* Refactor autoscaler tagging to support multiple tag specs

* Remove missing cryptography imports

* Update quote function import

* Fix threading issue in gcp.config with the compute discovery object

* Add gcs support for log_sync

* Fix the labels/tags naming discrepancy

* Add expanduser to file_mounts hashing

* Fix gcp.node_provider.internal_ip

* Add uuid to node name

* Remove 'set -i' from updater ssh command

* Also add TODO with the context and reason for the change.

* Update ssh key creation in autoscaler.gcp.config

* Fix wait_for_compute_zone_operation's threading issue

Google discovery api's compute object is not thread safe, and thus
needs to be recreated for each thread. This moves the
`wait_for_compute_zone_operation` under `autoscaler.gcp.config`, and
adds compute as its argument.

* Address pr feedback from @ericl

* Expand local file mount paths in NodeUpdater

* Add ssh_user name to key names

* Update updater ssh to attempt 'set -i' and fall back if that fails

* Update gcp/example-full.yaml

* Fix wait crm operation in gcp.config

* Update gcp/example-minimal.yaml to match aws/example-minimal.yaml

* Fix gcp/example-full.yaml comment indentation

* Add gcp/example-full.yaml to setup files

* Update example-full.yaml command

* Revert "Refactor autoscaler tagging to support multiple tag specs"

This reverts commit 9cf48409ca2e5b66f800153853072c706fa502f6.

* Update tag spec to only use characters [0-9a-z_-]

* Change the tag values to conform gcp spec

* Add project_id in the ssh key name

* Replace '_' with '-' in autoscaler tag names

* Revert "Update updater ssh to attempt 'set -i' and fall back if that fails"

This reverts commit 23a0066c5254449e49746bd5e43b94b66f32bfb4.

* Revert "Remove 'set -i' from updater ssh command"

This reverts commit 5fa034cdf79fa7f8903691518c0d75699c630172.

* Add fallback to `set -i` in force_interactive command

* Update autoscaler tests to match current implementation

* Update GCPNodeProvider.create_node to include hash in instance name

* Add support for creating multiple instance on one create_node call

* Clean TODOs

* Update styles

* Replace single quotes with double quotes
* Some minor indentation fixes etc.

* Remove unnecessary comment. Fix indentation.

* Yapfify files that fail flake8 test

* Yapfify more files

* Update project_id handling in gcp node provider

* temporary yapf mod

* Revert "temporary yapf mod"

This reverts commit b6744e4e15d4d936d1a14f4bf155ed1d3bb14126.

* Fix autoscaler/updater.py lint error, remove unused variable
2018-05-31 09:00:03 -07:00
Philipp Moritz
12de668ccb [ASV] Add ray.init and simple Ray benchmarks (#2166) 2018-05-31 00:06:17 -07:00
Alok Singh
fd234e3171 [rllib] Fix A3C PyTorch implementation (#2036)
* Use F.softmax instead of a pointless network layer

Stateless functions should not be network layers.

* Use correct pytorch functions

* Rename argument name to out_size

Matches in_size and makes more sense.

* Fix shapes of tensors

Advantages and rewards both should be scalars, and therefore a list of them
should be 1D.

* Fmt

* replace deprecated function

* rm unnecessary Variable wrapper

* rm all use of torch Variables

Torch does this for us now.

* Ensure that values are flat list

* Fix shape error in conv nets

* fmt

* Fix shape errors

Reshaping the action before stepping in the env fixes a few errors.

* Add TODO

* Use correct filter size

Works when `self.config['model']['channel_major'] = True`.

* Add missing channel major

* Revert reshape of action

This should be handled by the agent or at least in a cleaner way that doesn't
break existing envs.

* Squeeze action

* Squeeze actions along first dimension

This should deal with some cases such as cartpole where actions are scalars
while leaving alone cases where actions are arrays (some robotics tasks).

* try adding pytorch tests

* typo

* fixup docker messages

* Fix A3C for some envs

Pendulum doesn't work since it's an edge case (expects singleton arrays, which
`.squeeze()` collapses to scalars).

* fmt

* nit flake

* small lint
2018-05-30 10:48:11 -07:00
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
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
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
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
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
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
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
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
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
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
Simon Mo
0b07602c89 [DataFrame] Refactor __delitem__ (#2080)
* Implement the bug fix

* Fix flake8
2018-05-18 08:58:20 -10: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
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
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
Melih Elibol
bea97b425b Fix python linting (#2076) 2018-05-16 15:04:31 -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
Simon Mo
825c227c2b [DataFrame] Refactor indexers and implement setitem (#2020)
* Reset to_pandas change; update current

* Fix pd_df bug
2018-05-15 12:27:28 -07:00
SunYiran
79b45c6cfd [rllib]Update bc/policy.py (#2012) 2018-05-15 11:52:24 -07:00
Robert Nishihara
8fbb88485b Create RemoteFunction class, remove FunctionProperties, simplify worker Python code. (#2052)
* Cleaning up worker and actor code. Create remote function class. Remove FunctionProperties object.

* Remove register_actor_signatures function.

* Small cleanups.

* Fix linting.

* Support @ray.method syntax for actor methods.

* Fix pickling bug.

* Fix linting.

* Shorten testBlockingTasks.

* Small fixes.

* Call get_global_worker().
2018-05-14 14:35:23 -07:00
Robert Nishihara
52b0f3734a [xray] Add Travis build for testing xray on Linux. (#2047)
* Run xray tests in travis.

* Comment out TaskTests.testSubmittingManyTasks.

* Comment out failing tests.

* Comment out hanging test.

* Linting

* Comment out failing test.

* Comment out failing test.

* Ignore test_dataframe.py for now.

* Comment out testDriverExitingQuickly.
2018-05-13 21:22:01 -07:00
Alok Singh
c7f3b8c4d3 Fix typo in tune. (#2046)
Fix typo in tune.
2018-05-12 09:36:45 -07:00
Devin Petersohn
89e2eef3f3 [DataFrame] Fixing bugs in groupby (#2031) 2018-05-10 11:44:19 -07:00
Kunal Gosar
b79912ec74 [DataFrame] Fixes dropna subset bug (#2018)
* fix dropna

* resolve comment
2018-05-10 08:25:24 -07:00
Devin Petersohn
72a3a6cb02 [DataFrame] Implement where (#1989) 2018-05-09 14:05:52 -07:00
Kunal Gosar
d2c193ed2c [DataFrame] Add direct pandas imports for MVP (#1960)
* Add direct pandas imports for MVP

* rebase artifact
2018-05-08 19:19:32 -07:00
Robert Nishihara
77c8aa7627 Make ActorHandles pickleable, also make proper ActorHandle and ActorC… (#2007)
* Make ActorHandles pickleable, also make proper ActorHandle and ActorClass classes.

* Fix bug.

* Fix actor test bug.

* Update __ray_terminate__ usage.

* Fix most linting, add documentation, and small cleanups.

* Handle forking and pickling differently for actor handles. Fix linting.

* Fixes for named actors via pickling.

* Generate actor handle IDs deterministically in the pickling case.
2018-05-08 19:19:07 -07:00