Commit Graph
249 Commits
Author SHA1 Message Date
Noah GolmantandRichard Liaw 1ef9c0729d [tune] Initial track integration (#4362)
Introduces a minimally invasive utility for logging experiment results. A broad requirement for this tool is that it should integrate seamlessly with Tune execution.
2019-05-17 11:34:05 -07:00
Richard LiawandGitHub e20855ccae [tune] Remove extra parsing functionality (#4804) 2019-05-16 23:11:35 -07:00
Richard LiawandGitHub 88b45a53d6 [autoscaler] rsync cluster (#4785) 2019-05-16 23:11:06 -07:00
Richard LiawandRobert Nishihara 9f2645d6ea [tune] Fix CLI test (#4801) 2019-05-16 13:50:03 -07:00
Eric LiangandGitHub 351753aae5 [rllib] Remove dependency on TensorFlow (#4764)
* remove hard tf dep

* add test

* comment fix

* fix test
2019-05-10 20:36:18 -07:00
cgraywangandRichard Liaw 584adb45b8 [tune] Add MXNet Gluon example on CIFAR-10 (#4683) 2019-05-08 21:39:07 -07:00
Adi ZimmermanandRichard Liaw 28d381373d [tune] Add Ax to Tune (#4731) 2019-05-08 15:54:29 -07:00
Richard LiawandGitHub 7f50c96adb [tune] Reduce sampling API clutter (#4739)
Adds some sugar for tune sampling API (for commonplace sampling idioms).
2019-05-06 17:42:39 -07:00
Peng ZhenghaoandRichard Liaw 897b35ce36 [tune] fix restore error at tune.run() (#4733) 2019-05-04 02:56:15 -04:00
Adi ZimmermanandRichard Liaw 36b71d1446 [Tune] Post-Experiment Tools (#4351) 2019-05-04 02:51:26 -04:00
Andrew TanandRichard Liaw f87235f232 [tune] Example for Tune blog post (#4673) 2019-05-02 13:16:48 -04:00
Andrew TanandRichard Liaw 23ae73135e [tune] Tune CLI Fixes (#4659)
What do these changes do?
  Add --limit flag for ls
  Add ordering functionality to --sort flag
  Remove last_result from the names of columns for ls
  Fix weird double quote error messages (\")
2019-04-30 18:21:33 -07:00
Eric LiangandGitHub b1c9ea7ffc Update test_trial_scheduler.py (#4710) 2019-04-27 23:11:05 -07:00
Daniel HoandEric Liang d7d2694b57 [tune] Add config logging functionality to PBT scheduler (#4680) 2019-04-27 19:32:19 -07:00
Richard LiawandGitHub 776a7308c8 [tune] Better ASHA defaults (#4623)
## What do these changes do?
Sets ASHA defaults to paper defaults.


## Related issue number


## Linter

- [ ] I've run `scripts/format.sh` to lint the changes in this PR.
2019-04-15 01:45:43 -07:00
Richard LiawandEric Liang 0bfb0d2c29 [tune] Fix checkpointing for Gym Types 2019-04-12 21:03:56 -07:00
Romil BhardwajandRobert Nishihara 0f42f87ebc Updating zero capacity resource semantics (#4555) 2019-04-12 16:53:57 -07:00
justinwyangandRobert Nishihara e88e706fcc Enforce quoting style in Travis. (#4589) 2019-04-11 14:24:26 -07:00
Eric LiangandGitHub f8e8743347 [tune] Improve PBT example (#4575) 2019-04-09 20:59:17 -07:00
Dušan JosipovićandEric Liang 820c71b7d0 [tune/rllib] Add checkpoint eraser (#4490) 2019-04-06 20:01:54 -07:00
Andrew TanandRichard Liaw 991b911e1d [tune] Add --columns flag for CLI (#4564) 2019-04-05 19:49:01 -07:00
JérémyandRichard Liaw 300ec72d15 [tune] Add compatibility to nevergrad 0.2.0+ (#4529)
## What do these changes do?

This PR prepares for future version  0.2.0 of `nevergrad`, in which each suggestion is a `Candidate` instance having fields `args` and `kwargs` instead of being a `np.ndarray`. The proposed changes are compatible with all versions of `nevergrad` (manually tested with `nevergrad_example.py` on both `master` and current version `v0.1.6`).

See `nevergrad`'s [CHANGELOG](https://github.com/facebookresearch/nevergrad/blob/master/CHANGELOG.md) for more information on the change.

## Related issue number

None

## Linter

- [x] I've run `scripts/format.sh` to lint the changes in this PR.
2019-04-05 19:44:58 -07:00
Andrew TanandRichard Liaw bfd0af52bc [tune] Add documentation to --output flag (#4518)
## What do these changes do?

Add documentation for the `--output` flag for ls / lsx in the Tune CLI.

## Related issue number

Closes #4511 

## Linter

- [x] I've run `scripts/format.sh` to lint the changes in this PR.
2019-04-05 00:16:35 -07:00
Richard LiawandGitHub 50b2aa0740 [tune] Better handling of tune.function in global checkpoint (#4519)
Enables result keys to be queried by CLI.
2019-04-04 21:08:47 -07:00
Adi ZimmermanandRichard Liaw 51dae23d5c [tune] Search Alg delay import + CLI timing test (#4230) 2019-04-03 08:52:45 -07:00
Eric LiangandGitHub fce0062380 [rllib] Switch to tune.run() instead of run_experiments() (#4515) 2019-03-30 14:07:50 -07:00
Andrew TanandRichard Liaw 12db684f72 [tune] add filter flag for Tune CLI (#4337)
## What do these changes do?

Adds filter flag (--filter) to ls / lsx commands for Tune CLI.

Usage: `tune ls [path] --filter [column] [operator] [value]`
e.g. `tune lsx ~/ray_results/my_project --filter total_trials == 1`
2019-03-27 11:19:25 -07:00
Richard LiawandGitHub a275af337e [tune] Make examples more verbose (#4469)
## What do these changes do?
Verbosity defaults to "1", so here we default verbosity for a couple
examples.

## Related issue number

Fixes #4467
2019-03-25 15:13:17 -07:00
Richard LiawandEric Liang 32bf23d24f [tune] Remove output of tests 2019-03-22 10:48:03 -07:00
Richard LiawandGitHub 828dc08ac8 [tune] Fix tests for Function API for better consistency (#4421) 2019-03-20 22:31:38 -07:00
gehringandRichard Liaw 7c3274e65b [tune] Make the logging of the function API consistent and predictable (#4011)
## What do these changes do?

This is a re-implementation of the `FunctionRunner` which enforces some synchronicity between the thread running the training function and the thread running the Trainable which logs results. The main purpose is to make logging consistent across APIs in anticipation of a new function API which will be generator based (through `yield` statements). Without these changes, it will be impossible for the (possibly soon to be) deprecated reporter based API to behave the same as the generator based API.

This new implementation provides additional guarantees to prevent results from being dropped. This makes the logging behavior more intuitive and consistent with how results are handled in custom subclasses of Trainable.

New guarantees for the tune function API:

- Every reported result, i.e., `reporter(**kwargs)` calls, is forwarded to the appropriate loggers instead of being dropped if not enough time has elapsed since the last results.
- The wrapped function only runs if the `FunctionRunner` expects a result, i.e., when `FunctionRunner._train()` has been called. This removes the possibility that a result will be generated by the function but never logged.
- The wrapped function is not called until the first `_train()` call. Currently, the wrapped function is started during the setup phase which could result in dropped results if the trial is cancelled between `_setup()` and the first `_train()` call.
- Exceptions raised by the wrapped function won't be propagated until all results are logged to prevent dropped results.
- The thread running the wrapped function is explicitly stopped when the `FunctionRunner` is stopped with `_stop()`.
- If the wrapped function terminates without reporting `done=True`, a duplicate result with `{"done": True}`, is reported to explicitly terminate the trial, and components will be notified with a duplicate of the last reported result, but this duplicate will not be logged.

## Related issue number

Closes #3956.
#3949
#3834
2019-03-18 19:14:26 -07:00
Kristian HartikainenandRichard Liaw 2a046116ce [tune] Fix _SafeFallbackEncoder type checks (#4238)
* Fix numpy type checks for _SafeFallbackEncoder

* Format changes

* Fix usage of nan_str in _SafeFallbackEncoder
2019-03-18 16:34:56 -07:00
Richard LiawandGitHub ea5a6f8455 [tune] Simplify API (#4234)
Uses `tune.run` to execute experiments as preferred API.

@noahgolmant

This does not break backwards compat, but will slowly internalize `Experiment`. 

In a separate PR, Tune schedulers should only support 1 running experiment at a time.
2019-03-17 13:03:32 -07:00
markgoodheadandRichard Liaw 20a155d03d [Tune] Support initial parameters for SkOpt search algorithm (#4341)
Similar to the recent change to HyperOpt (#https://github.com/ray-project/ray/pull/3944) this implements both:
1. The ability to pass in initial parameter suggestion(s) to be run through Tune first, before using the Optimiser's suggestions. This is for when you already know good parameters and want the Optimiser to be aware of these when it makes future parameter suggestions.
2. The same as 1. but if you already know the reward value for those parameters you can pass these in as well to avoid having to re-run the experiments. In the future it would be nice for Tune to potentially support this functionality directly by loading previously run Tune experiments and initialising the Optimiser with these (kind of like a top level checkpointing functionality) but this feature allows users to do this manually for now.
2019-03-16 23:11:30 -07:00
Richard LiawandGitHub 5e95abe63e [tune] Fix performance issue and fix reuse tests (#4379)
* fix tests

* better name

* reduce warnings

* better resource tracking

* oops

* revertmessage

* fix_executor
2019-03-16 13:52:02 -07:00
Eric LiangandGitHub 2c1131e8b2 [tune] Add warnings if tune event loop gets clogged (#4353)
* add guards

* comemnts
2019-03-14 19:44:01 -07:00
Andrew TanandRichard Liaw 87bfa1cf82 [tune] add output flag for Tune CLI (#4322) 2019-03-12 23:56:59 -07:00
Eric LiangandGitHub d5f4698305 [tune] Avoid scheduler blocking, add reuse_actors optimization (#4218) 2019-03-12 23:49:31 -07:00
Andrew TanandRichard Liaw c435013b27 [tune] add-note command for Tune CLI (#4321)
Co-Authored-By: andrewztan <andrewztan12@gmail.com>
2019-03-11 14:16:44 -07:00
Richard LiawandGitHub 6630a35353 [tune] Initial Commit for Tune CLI (#3983)
This introduces a light CLI for Tune.
2019-03-08 16:46:05 -08:00
Richard LiawandGitHub c3a3360a4a [tune] Add custom field for serializations (#4237) 2019-03-08 11:00:25 -08:00
Kristian HartikainenandRichard Liaw 7e4b4822cf [tune] Fix worker recovery by setting force=False when calling logger sync_now (#4302)
## What do these changes do?
Fixes a tune autoscaling problem where worker recovery causes things to stall.
2019-03-08 10:59:31 -08:00
Richard LiawandGitHub a5441a3381 [tune] Fix testTrialNoSave (#4262)
Left a `last_result == None` after changing last_result to always be a
dict.



Fixes https://github.com/ray-project/ray/issues/4259.
2019-03-05 09:28:33 -08:00
Kristian HartikainenandRichard Liaw df9beb7123 [tune] Fix trial result fetching (#4219)
* Fix trial results wait in RayTrialExecutor.get_next_available_trial

* Add comment for the results shuffling

* Remove timeout from the wait

* Change random.sample to random.shuffle
2019-03-04 14:26:10 -08:00
Adi ZimmermanandRichard Liaw 9551f2a92e [tune] Properly handle closing files in Trainable (#4232)
Fixes #3965.

Using the with keyword/block will close to file immediately after the block ends
2019-03-03 14:23:05 -08:00
Richard LiawandGitHub 3483282254 [tune] Local Mode support (#4138) 2019-03-03 14:05:59 -08:00
Richard LiawandGitHub fb1369d96f [tune] Dynamic Resources for Trials (#3974)
## What do these changes do?

Provides a small helper function for modifying the resource requirements of a trial.

Also implements the following:
 - setting the last_result to be {} instead of None
 - Adding a shuffle to the BasicVariantGenerator
2019-03-03 11:38:36 -08:00
Richard LiawandGitHub a27cb225b6 Modularize Tune tests from multi-node tests (#4204) 2019-03-02 19:21:08 -08:00
Robert NishiharaandPhilipp Moritz 4b89eebfc7 Move test folders under rllib/tune from test -> tests. (#4214) 2019-03-02 13:37:16 -08:00
adodaandRichard Liaw 11a28834fa [tune] Reduce the times for flushing json object to file (#4198)
<!--
Thank you for your contribution!

Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request.
-->

## What do these changes do?

<!-- Please give a short brief about these changes. -->
When we write one result using JsonLogger, it will call 'flush' many times, which may cost a lot of time when writing  to a remote distributed filesystem.

## Related issue number
#4197 
<!-- Are there any issues opened that will be resolved by merging this change? -->
2019-03-01 02:15:48 -08:00