Commit Graph
71 Commits
Author SHA1 Message Date
Eric Liang 82a5ed3fb5 [autoscaler] Instance type assert fix for non-AWS node providers (#9223) 2020-07-01 17:54:20 -07:00
Eric Liang 536795ef79 [autoscaler] Initial support for multiple worker types (#9096)
* wip

* fix

* update

* debug state

* fix

* update

* update

* fix test

* fix

* fix

* update

* fix

* types and docs

* update
2020-06-24 23:08:30 -07:00
Eric Liang 0ff24ec8dc Add "ray status" debug tool for autoscaler. (#9091) 2020-06-24 18:22:03 -07:00
Ian Rodney 67e049bc7b [autoscaler/docker] Relax missing docker section (#9105) 2020-06-24 12:35:42 -07:00
Ian RodneyandRichard Liaw 0e82f0d7c3 [autoscaler] Create Docker Command Runner (v2) (#8840)
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
2020-06-12 16:38:38 -07:00
Ian Rodney b07b4f2e55 Revert "[autoscaler] Create Docker Command Runner" (#8816)
This reverts commit 54189bca5a.
2020-06-06 14:21:44 -07:00
Ian RodneyandRichard Liaw 54189bca5a [autoscaler] Create Docker Command Runner (#8806)
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
2020-06-05 17:29:27 -07:00
Eric Liang a24d117c68 [autoscaler] Refactor code in preparation for multi instance type support (#8632)
* wip refactor

* add util

* wip

* fix

* fix

* remove

* remove extraneous string type for sg
2020-06-03 12:53:55 -07:00
Patrick Ames 76450c8d47 [autoscaler] Honor separate head and worker node subnet IDs (#8374) 2020-05-28 18:16:46 -07:00
49439611f1 [autoscaler] Replace cluster yaml validation with json schema v… (#7261)
* replace manual cluster yaml validation with json schema
- improved error message
- support for intellisense in VSCode (or other IDEs)
- run linting
- moved schema to ray/autoscaler
- fixed typo
- remove importlib dependency

* Update python/ray/autoscaler/autoscaler.py

* read

* restrict allowed properties

* added unit test for invalid yaml
added ray[test] package (remove pytest from default dependencies)

* updated autoscaler test to use ValidationError exception

* add missing dependency

* added pytest

* replace manual cluster yaml validation with json schema
- improved error message
- support for intellisense in VSCode (or other IDEs)
- run linting
- moved schema to ray/autoscaler
- fixed typo
- remove importlib dependency

* Update python/ray/autoscaler/autoscaler.py

* read

* restrict allowed properties

* added unit test for invalid yaml
added ray[test] package (remove pytest from default dependencies)

* updated autoscaler test to use ValidationError exception

* add missing dependency

* added pytest

* removed parameterized dependency
reverted ray[test] intro

* removed parameterized

* fix_tests

* format

Co-authored-by: Ubuntu <marcozo@mc-ray-jumpbox.chcbtljllnieveqhw3e4c1ducc.xx.internal.cloudapp.net>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
2020-03-10 18:58:55 -07:00
Sven 60d4d5e1aa Remove future imports (#6724)
* Remove all __future__ imports from RLlib.

* Remove (object) again from tf_run_builder.py::TFRunBuilder.

* Fix 2xLINT warnings.

* Fix broken appo_policy import (must be appo_tf_policy)

* Remove future imports from all other ray files (not just RLlib).

* Remove future imports from all other ray files (not just RLlib).

* Remove future import blocks that contain `unicode_literals` as well.
Revert appo_tf_policy.py to appo_policy.py (belongs to another PR).

* Add two empty lines before Schedule class.

* Put back __future__ imports into determine_tests_to_run.py. Fails otherwise on a py2/print related error.
2020-01-09 00:15:48 -08:00
Robert Nishihara 39a3459886 Remove (object) from class declarations. (#6658) 2020-01-02 17:42:13 -08:00
Philipp Moritz fc655acfee Fix linting on master branch (#6174) 2019-11-16 10:02:58 -08:00
Adam Gleave e8cce3fdd4 [autoscaler]: automatically pull new docker image (#6111)
* Docker: automatically pull new image

* Fix missing value in schema

* Address review comments
2019-11-15 21:26:28 -08:00
Edward Oakes 6eaa8e31fa [autoscaler] Revert to double-spawning updater threads (#5903)
* [autoscaler] Revert to double-spawning threads

* Use log prefix

* add comment
2019-10-13 20:00:06 +01:00
Robert Nishihara 523c764c25 Python 2 compatibility. (#5887) 2019-10-10 19:09:25 -07:00
Edward Oakes 972dddd776 [autoscaler] Kubernetes autoscaler backend (#5492)
* Add Kubernetes NodeProvider to autoscaler

* Split off SSHCommandRunner

* Add KubernetesCommandRunner

* Cleanup

* More config options

* Check if auth present

* More auth checks

* Better output

* Always bootstrap config

* All working

* Add k8s-rsync comment

* Clean up manual k8s examples

* Fix up submit.yaml

* Automatically configure permissisons

* Fix get_node_provider arg

* Fix permissions

* Fill in empty auth

* Remove ray-cluster from this PR

* No hard dep on kubernetes library

* Move permissions into autoscaler config

* lint

* Fix indentation

* namespace validation

* Use cluster name tag

* Remove kubernetes from setup.py

* Comment in example configs

* Same default autoscaling config as aws

* Add Kubernetes quickstart

* lint

* Revert changes to submit.yaml (other PR)

* Install kubernetes in travis

* address comments

* Improve autoscaling doc

* kubectl command in setup

* Force use_internal_ips

* comments

* backend env in docs

* Change namespace config

* comments

* comments

* Fix yaml test
2019-10-03 10:17:00 -07:00
Eric Liang 493364d3bd [autoscaler] Add unit tests for stopped node caching, fix flaky tests (#5793) 2019-09-27 22:36:09 -07:00
Eric Liang 56ab9a00bb [autoscaler] cache stopped nodes, no screen on attach (#5741) 2019-09-22 17:30:35 -07:00
Eric Liang 3ed18d0b59 Fix edge case in autoscaler with poor bin packing (#5702)
* fix edge case

* fix for general case
2019-09-13 11:46:10 -07:00
Eric Liang 2fdefe19b7 Take into account queue length in autoscaling (#5684) 2019-09-11 11:31:35 -07:00
Eric Liang d20696300e Fix autoscaler format string for memory (#5542)
* add format string

* fix cast
2019-08-26 23:25:11 -07:00
Daniel Edgecumbe 06fec63c87 [autoscaler] Add a 'request_cores' function for manual autoscaling (#4754) 2019-07-26 17:14:45 -07:00
Richard Liaw 3e0ad11ae0 Add heartbeat test + Fix monitor.py (#5191) 2019-07-16 21:59:48 -07:00
Richard Liaw 1530389822 [tune] Fast Node Recovery (#5053) 2019-07-12 13:47:30 -07:00
Eric Liang 445bcb29b0 [hotfix] fix backward compat with older yaml libraries 2019-07-06 20:41:28 -07:00
Brandon Bertelsen c04b69902c Updates for #5072 (#5091) 2019-07-06 16:05:50 -07:00
Qing Wang d9768c1cd2 [hotfix] Fix master's linting (#5049)
The linting in CI on master always fail.
2019-06-27 20:21:32 +08:00
Daniel Edgecumbe 49c6e81de2 autoscaler/monitor: Kill workers on exception (#4997) 2019-06-26 17:59:12 -07:00
Romil Bhardwaj 0421cba4e8 Autoscaler hotfix for #4555. (#4653) 2019-05-08 14:50:52 -07:00
Daniel Edgecumbe 3e1adafbce [autoscaler] Add an aggressive_autoscaling flag (#4285) 2019-04-13 18:44:32 -07:00
justinwyang e88e706fcc Enforce quoting style in Travis. (#4589) 2019-04-11 14:24:26 -07:00
Kristian Hartikainen ed02bf11f7 [autoscaler] Lint code that we forgot to lint in #4537 (#4584)
* Lint code that we forgot to lint in previous PR

* Revert setup command merge

* Lint

* Revert "Revert setup command merge"

This reverts commit 55e1cdb1f256ea51ef66a38730d8f7865f1f5ad1.

* Fix testReportsConfigFailures test

* Minor syntax tweaks

* Lint
2019-04-10 17:01:36 +08:00
Stefan Pantic 915486984a [autoscaler] Add support for separate docker containers on head and worker nodes (#4537)
* Added support for running different docker containers on clusters

* Remove node specific container names

* Keep old options and expand with node specific configuration

* Optimized imports

* Changed docker fields for autoscaler

* Auto reformat

* Updated comments

* Updated condition

* Run linter

* Updated example

* Changed condition for docker images, updated examples

* Removed duplicate line

* Fixed setup_commands

* Update autoscaler.py

* fix_better_image
2019-04-07 16:51:32 -07:00
Yuhong Guo c2349cf12d Remove local/global_scheduler from code and doc. (#4549) 2019-04-03 17:05:09 -07:00
Kristian Hartikainen 524e69a82d [autoscaler] Change the get behavior of node providers' _get_node (#4132)
* Change the get behavior of GCPNodeProvider._get_node

* Add lock around the GCPNodeProvider._get_node call

* rename nodes

* lint

* Update GCPNodeProvider._get_node to match aws implementation

* assert

* log

* log highest heartbeats

* rename

* bringup to connected

* prune heartbeat times

* fix bringup
2019-02-24 18:43:35 -08:00
Zachary Barry ae4dd1db76 Custom provider_config options for NodeProvider implementations (#4075)
* added a key to send custom provider_config options to NodeProvider implementations

* Update autoscaler.py

* Update autoscaler.py
2019-02-21 21:09:22 -08:00
Kristian Hartikainen 729d0b2825 [autoscaler] docker run options (#3921)
Adds support for docker options, allowing for use of nvidia-docker.

Closes #2657.
2019-02-13 12:26:28 -08:00
Daniel Edgecumbe 315edab085 [autoscaler] Speedups (#3720)
- NodeUpdater gets its' IP in parallel now (no longer in __init__)
- We use persistent connections in SSH (temp folder created only for ray; ControlMaster)
- hash_runtime_conf was performing a pointless hexlify step, wasting time on large files
- We use NodeUpdaterThreads and share the NodeProvider; NodeUpdaterProcess is removed
- AWSNodeProvider caches nodes more aggressively
- NodeProvider now has a shim batch terminate_nodes() call; AWSNodeProvider parallelises it; the autoscaler uses it
- AWSNodeProvider batches EC2 update_tags calls
- Logging changes throughout to provide standardised timing information for profiling
- Pulled out a few unnecessary is_running calls (NodeUpdater will loop waiting for SSH anyway)

## Related issue number
Issue #3599
2019-02-01 02:46:32 -08:00
Daniel Edgecumbe ff3c6af1d6 [autoscaler]: Remove assertion in info string (#3916)
Fixes #3903
2019-02-01 00:32:24 -08:00
Eric Liang c75038b945 [autoscaler] Updating a file in file mounts causes all worker nodes to get restarted 2019-01-27 17:41:37 -08:00
Richard Liaw fa99fda2b4 Application Stress Tests (#3612) 2019-01-16 02:05:16 -08:00
mattearllongshot 681e8cd3fd [autoscaler] Add an initial_workers option (#3530)
## What do these changes do?

    This option goes along with `min_workers`, and `max_workers`.  When the
    cluster is first brought up (or when it is refreshed with a subsequent
    `ray up`) this number of nodes will be started.
    
    It's a workaround for issues of scaling (see related issues) where it
    can take a long time (or forever in the case where the head node has
    `--num-cpus 0`) to scale up a cluster in response to increasing demand.


## Related issue number

Workaround for https://github.com/ray-project/ray/issues/3339 and https://github.com/ray-project/ray/issues/2106
2019-01-05 17:58:42 -08:00
Eric Liang 962f18756b [autoscaler] Use fixed timestamp to check against health timeouts (#3503) 2018-12-10 14:58:27 -05:00
Eric Liang aa94d3dd50 [autoscaler] Allow more than 5s from node creation to first heartbeat (#3385) 2018-11-26 17:25:05 -08:00
Eric Liang 588705b6fa [autoscaler] Add option to allow private ips only (#3270)
* merge

* update

* upd

* Update python/ray/autoscaler/autoscaler.py

Co-Authored-By: ericl <ekhliang@gmail.com>

* Update python/ray/autoscaler/autoscaler.py

Co-Authored-By: ericl <ekhliang@gmail.com>

* Update python/ray/autoscaler/aws/config.py

Co-Authored-By: ericl <ekhliang@gmail.com>

* fix
2018-11-08 17:07:31 -08:00
Richard Liaw dbba7f2a53 [autoscaler] Cleanup Logging (#2709)
Moves Autoscaler onto Python `logging` module.
2018-08-25 17:08:45 -07:00
Eric Liang 9473da69bd [autoscaler] Experimental support for local / on-prem clusters (#2678)
This adds some experimental (undocumented) support for launching Ray on existing nodes. You have to provide the head ip, and the list of worker ips.

There are also a couple additional utils added for rsyncing files and port-forward.
2018-08-19 12:43:04 -07:00
Eric Liang 079c4e482a ray exec and ray attach commands (#2560)
ray exec CLUSTER CMD [--screen] [--start] [--stop]
ray attach CLUSTER [--start]

Example:
ray exec sgd.yaml 'source activate tensorflow_p27 && cd ~/ray/python/ray/rllib && ./train.py --run=PPO --env=CartPole-v0' --screen --start --stop

This will in one command create a cluster and run the command on it in a screen session. The screen can later be attached to via ray attach. After the command finishes, the cluster workers will be terminated and the head node stopped.
2018-08-15 14:31:50 -07:00
Steve Severance f1b4ea69a3 Prevent hasher from running out of memory on large files (#2451)
* Prevent hasher from running out of memory on large files

* dump out keys

* only print if failed

* remove debugging

* Fix lint error. Reverse adding newline.
2018-07-28 23:29:09 -07:00