ray/doc/source/tune
xwjiang2010 323511b716
[tune] Single wait refactor. (#21852)
This is a down scoped change. For the full overview picture of Tune control loop, see [`Tune control loop refactoring`](https://docs.google.com/document/d/1RDsW7SVzwMPZfA0WLOPA4YTqbRyXIHGYmBenJk33HaE/edit#heading=h.2za3bbxbs5gn)

1. Previously there are separate waits on pg ready and other events. As a result, there are quite a few timing tweaks that are inefficient, hard to understand and unit test. This PR consolidates into a single wait that is handled by TrialRunner in each step.
- A few event types are introduced, and their mapping into scenarios
  * PG_READY --> Should place a trial onto it. If somehow there is no trial to be placed there, the pg will be put in _ready momentarily. This is due to historically resources is conceptualized as a pull based model. 
  * NO_RUNNING_TRIALS_TIME_OUT --> possibly not sufficient resources case
  * TRAINING_RESULT
  * SAVING_RESULT
  * RESTORING_RESULT
  * YIELD --> This just means that simply taking very long to train. We need to punt back to the main loop to print out status info etc.

2. Previously TrialCleanup is not very efficient and can be racing between Trainable.stop() and `return_placement_group`. This PR streamlines the Trial cleanup process by explicitly let Trainable.stop() to finish followed by `return_placement_group(pg)`. Note, graceful shutdown is needed in cases like `pause_trial` where checkpointing to memory needs to be given the time to happen before the actor is gone. 

3. There are quite some env variables removed (timing tweaks), that I consider OK to proceed without deprecation cycle.
2022-02-09 15:31:17 +00:00
..
api_docs [tune] Single wait refactor. (#21852) 2022-02-09 15:31:17 +00:00
examples [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00
images [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00
tutorials [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00
faq.rst [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00
getting-started.rst [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00
index.rst [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00
key-concepts.rst [Docs ] Tune docs overhaul (first part) (#22112) 2022-02-07 15:47:03 +00:00