Commit graph

808 commits

Author SHA1 Message Date
Eric Liang
64053278aa
[tune] Support lambda functions in hyperparameters / tune rllib multiagent support (#2568)
* update

* func

* Update registry.py

* revert
2018-08-07 16:29:21 -07:00
Richard Liaw
bb44456f6f
[rllib, tune] TrainingResult -> Dict, Removes C408 from flake8 (#2565) 2018-08-07 12:17:44 -07:00
Philipp Moritz
a3202f581c [xray] Add flag to start raylet in valgrind (#2582) 2018-08-07 11:25:21 -07:00
Yuhong Guo
9825da7233 Change training tasks to xray for Jenkins tests (#2567) 2018-08-06 13:35:26 -07:00
Eric Liang
981d9818c1
[rllib] Support the timesteps_per_batch in simple optimizer PPO mode (#2558)
* support ts

* doc

* Update sync_samples_optimizer.py
2018-08-06 12:10:59 -07:00
Richard Liaw
914a433e3f
[tune] Split Search from Scheduling (#2452)
Introduces SearchAlgorithm concept, separate from schedulers in Tune. Moves HyperOpt under this concept.
2018-08-04 21:27:39 -07:00
Eric Liang
9449d07eca
[rllib] Fix crash when setting horizon in multiagent
If a horizon is set, an env terminates without done=True.
2018-08-03 16:37:56 -07:00
Philipp Moritz
d5dda1ebf2 copy all files when installing pyarrow (#2547) 2018-08-02 17:06:37 -07:00
Peter Schafhalter
7a5f25248e [rllib] Improve conv_filters documentation (#2540)
* Improve conv_filters documentation

* Update catalog.py

* Update catalog.py
2018-08-02 14:29:40 -07:00
Eric Liang
f7ec292360
[rllib] Support agent.get_action in multiagent (#2543)
* support get action on policy id

* comment

* grammar fixes

* Update rllib-algorithms.rst
2018-08-02 13:35:53 -07:00
Yuhong Guo
d2ebe4d9a3 Fix frequent failure of Jenkins CI. (#2490) 2018-08-02 10:28:28 -07:00
Eric Liang
9ea57c2a93
[rllib] Basic IMPALA implementation (using deepmind's reference vtrace.py) (#2504)
Rename AsyncSamplesOptimizer -> AsyncReplayOptimizer
  Add AsyncSamplesOptimizer that implements the IMPALA architecture
  integrate V-trace with a3c policy graph
  audit V-trace integration
  benchmark compare vs A3C and with V-trace on/off
PongNoFrameskip-v4 on IMPALA scaling from 16 to 128 workers, solving Pong in <10 min. For reference, solving this env takes ~40 minutes for Ape-X and several hours for A3C.
2018-08-01 20:53:53 -07:00
Eric Liang
9a479b3a63
[rllib] Document creating an ensemble of envs; also add vector_index attribute to env config (#2513)
This also removes the async resetting code in VectorEnv. While that improves benchmark performance slightly, it substantially complicates env configuration and probably isn't worth it for most envs.

This makes it easy to efficiently support setups like Joint PPO: https://s3-us-west-2.amazonaws.com/openai-assets/research-covers/retro-contest/gotta_learn_fast_report.pdf

For example, for 188 envs, you could do something like num_envs: 10, num_envs_per_worker: 19.
2018-08-01 16:29:27 -07:00
Eric Liang
a630e332f3
[rllib] Don't use get_gpu_ids() in ppo
This lets the num_gpus config work properly even when not using tune, since the gpu ids won't be set by ray in that case.
2018-08-01 16:25:11 -07:00
Eric Liang
d9a36c4e39
[rllib] Document auto-concat in a3c (#2533)
* docs

* update hyperparm docs
2018-08-01 15:11:30 -07:00
Melih Elibol
89f60e39f3
Override user-specified name tag. (#2480)
Override user-specified name tag.
2018-08-01 14:16:57 -04:00
Robert Nishihara
909d7172b1 Introduce constant for ID_SIZE in python code. (#2517) 2018-07-31 12:40:53 -07:00
Eric Liang
38d00986a5
[rllib] Cleanups: deep merge configs properly; enforce min iter time on APEX (#2500)
The dict merge prevents crashes when tune is trying to get resource requests for agents and you override a config subkey. The min iter time prevents iterations from getting too small, incurring high overhead. This is easy to run into on Ape-X since throughput can get very high.
2018-07-30 13:25:35 -07:00
Eric Liang
62a52ee989
[rllib] Fix corner case in rnn episode handling
We should use episode ids instead of the timestep to determine when sequences should be cut, since when batches are concatenated, increasing t does not guarantee we are part of the same episode.
2018-07-30 13:24:43 -07:00
Philipp Moritz
696a229ece Fix text verbosity in python 2.7 by running tests with pytest (#2470) 2018-07-30 11:04:06 -07:00
Robert Nishihara
3f3514c2b3 Deprecate PYTHON_MODE more gracefully. (#2487) 2018-07-29 16:25:46 -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
Eric Liang
90a3ea9443 [xray] Fix heartbeat subscription for autoscaler (#2498) 2018-07-28 13:34:55 -07:00
Peter Schafhalter
e10377567c Add benchmark for ray.get (#2499) 2018-07-28 09:09:21 -07:00
Peter Schafhalter
ccb9a27393 Add benchmarks for ray.put (#2489) 2018-07-27 17:49:21 -07:00
Peter Schafhalter
302510ada0 [asv] Add actor benchmarks (#2469)
* Add actor benchmarks

* Fix bug

* Address comments and refactor

* Update benchmark_actor.py
2018-07-27 17:40:02 -07:00
Eric Liang
24649726dc
[rllib] Use batch.count in async samples optimizer (#2488)
Using the actual batch size reduces the risk of mis-accounting. Here, we under-counted samples since in truncate_episodes mode we were doubling the batch size by accident in policy_evaluator.
2018-07-27 16:44:21 -07:00
Peter Schafhalter
1e6b130b90 [asv] Add benchmarks for tasks (#2471)
* Add benchmarks for tasks

* Fixes

* Add timeout
2018-07-27 13:59:55 -07:00
Stephanie Wang
6675361684 [xray] Track ray.get calls as task dependencies (#2362) 2018-07-27 11:59:17 -07:00
Yuhong Guo
46351957bb Fix MAC_WHEELS=1 (#2477) 2018-07-25 14:57:28 -07:00
Richard Liaw
7edc677304
[rllib] Extra Changes for Usability (#2363) 2018-07-24 20:51:22 -07:00
Sergey Kolesnikov
05490b8cb9 [rllib] dqn/ddpg policy customization (#2445)
* dqn policy update - more customization

* docs for custom DQN graph

* Update rllib-training.rst

* Update rllib-models.rst

* Update rllib.rst

* Update rllib-training.rst

* Update rllib-concepts.rst

* yapf codestyle
2018-07-22 14:47:14 -07:00
Eric Liang
68660453e4
[rllib] Better support and add two-trainer example for multiagent (#2443)
This adds a simple DQN+PPO example for multi-agent. We don't do anything fancy here, just syncing weights between two separate trainers. This potentially is wasting some compute, but is very simple to set up.

It might be nice to share experience collection between the top-level trainers in the future.
2018-07-22 05:09:25 -07:00
Shuo
99d0d96aef Use different serialization context for each driver. (#2406) 2018-07-20 23:42:49 -07:00
Hao Chen
05f485e274 Allow Ray API to be used from multiple threads (#2422) 2018-07-20 15:39:01 -07:00
Peter Schafhalter
400a3e5705 Add queue size and __len__ methods (#2432) 2018-07-19 17:04:42 -07:00
Peter Schafhalter
4225ac5081 Add benchmark using queue (#2431) 2018-07-19 16:43:22 -07:00
Eric Liang
8e75d150f7
[rllib] Apex crash when compress_observations: False (#2426)
We shouldn't try to decompress uncompressed data.

Also, fix resource requests for ddpg + GPU.
2018-07-19 15:58:09 -07:00
Eric Liang
d01dc9e22d
[rllib] format with yapf (#2427)
* initial yapf

* manual fix yapf bugs
2018-07-19 15:30:36 -07:00
Robert Nishihara
24eb140e07 Remove redundant reconstruct call. (#2421) 2018-07-19 11:22:02 -07:00
Robert Nishihara
991d0911d1 Move profile data flushing to background thread on workers. (#2415)
* Move profile data flushing to background thread on workers.

* Remove outdated comment.
2018-07-18 12:34:53 -07:00
Eric Liang
f31a6ca965
[rllib] Count actual sample batch size instead of configured batch size in A3C. (#2399)
This fixes a metrics accounting bug where the sample count is not reported correctly.
2018-07-18 08:59:52 +02:00
Richard Liaw
8e8c733696
[tune] Fix Categorical Space + Add Keras Example (#2401)
Previously did not properly resolve categorical variables for HyperOpt.
2018-07-17 23:52:52 +02:00
Eric Liang
0cecf6b79c
[rllib] Cleanup RNN support and make it work with multi-GPU optimizer (#2394)
Cleanup: TFPolicyGraph now automatically adds loss input entries for state_in_*, so that graph sub-classes don't need to worry about it.

Multi-GPU support:

Allow setting up model tower replicas with existing state input tensors

Truncate the per-device minibatch slices so that they are always a multiple of max_seq_len.
2018-07-17 06:55:46 +02:00
Peter Schafhalter
f5c46c7765 Add queue data structures (#2261) 2018-07-16 16:26:20 -07:00
Hao Chen
8a3e180156 Move profiling code to a new file and fix thread safety (#2397) 2018-07-15 18:09:52 -07:00
Eric Liang
7865dbab84 [tune] Raise error if incorrect key used in config (#2400) 2018-07-15 00:25:19 +02:00
Eric Liang
62f84d2f07 [rllib] Restore TF soft placement config to fix multi-GPU optimizer (#2395) 2018-07-13 10:34:37 +02:00
Hao Chen
d6af50785e move import_thread to a separate file (#2349)
* move import_thread to a separate file

* sort imports

* group imports regardless of `from`

* re-organize imoprts based on google style

* Update import_thread.py

* fix event_type names in profile statement

* unify duplicate code
2018-07-12 21:26:24 -07:00
Robert Nishihara
515da7721a Change ray.worker.cleanup -> ray.shutdown and improve API documentation. (#2374)
* Change ray.worker.cleanup -> ray.shutdown and improve API documentation.

* Deprecate ray.worker.cleanup() gracefully.

* Fix linting
2018-07-12 12:00:00 -07:00