Skip to content

Commit

Permalink
[air/output] Switch on per default (#35389)
Browse files Browse the repository at this point in the history
After #35129 prepared the switch, this PR actually flicks it: It enables the new context-aware output engine per default.

This was moved into a separate PR so it's easily revertible and can be enabled quickly after branch cut.

Signed-off-by: Kai Fricke <[email protected]>
  • Loading branch information
krfricke authored May 23, 2023
1 parent 89e16dd commit 6e9dfd9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions doc/source/ray-air/experimental-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ Context-aware progress reporting

.. note::

This feature is *disabled by default* in Ray 2.5.
This feature is *enabled by default* in Ray 2.6.

To enable, set the environment variable ``RAY_AIR_NEW_OUTPUT=1``.
To disable, set the environment variable ``RAY_AIR_NEW_OUTPUT=0``.

A context-aware output engine is available for Ray Train and Ray Tune runs.

Expand Down
10 changes: 5 additions & 5 deletions python/ray/air/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,12 +727,12 @@ class RunConfig:
intermediate experiment progress. Defaults to CLIReporter if
running in command-line, or JupyterNotebookReporter if running in
a Jupyter notebook.
verbose: 0, 1, 2, or 3. Verbosity mode.
0 = silent, 1 = only status updates, 2 = status and brief
results, 3 = status and detailed results. Defaults to 3.
verbose: 0, 1, or 2. Verbosity mode.
0 = silent, 1 = default, 2 = verbose. Defaults to 1.
If the ``RAY_AIR_NEW_OUTPUT=1`` environment variable is set,
uses the new context-aware verbosity settings:
0 = silent, 1 = default, 2 = verbose.
uses the old verbosity settings:
0 = silent, 1 = only status updates, 2 = status and brief
results, 3 = status and detailed results.
log_to_file: Log stdout and stderr to files in
trial directories. If this is `False` (default), no files
are written. If `true`, outputs are written to `trialdir/stdout`
Expand Down
5 changes: 4 additions & 1 deletion python/ray/tune/experimental/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,17 @@ class AirVerbosity(IntEnum):
DEFAULT = 1
VERBOSE = 2

def __repr__(self):
return str(self.value)


IS_NOTEBOOK = ray.widgets.util.in_notebook()


def get_air_verbosity(
verbose: Union[int, AirVerbosity, Verbosity]
) -> Optional[AirVerbosity]:
if os.environ.get("RAY_AIR_NEW_OUTPUT", "0") == "0":
if os.environ.get("RAY_AIR_NEW_OUTPUT", "1") == "0":
return None

if isinstance(verbose, AirVerbosity):
Expand Down
10 changes: 5 additions & 5 deletions python/ray/tune/tune.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,12 @@ def run(
training workers.
checkpoint_upload_from_workers: Whether to upload checkpoint files
directly from distributed training workers.
verbose: 0, 1, 2, or 3. Verbosity mode.
0 = silent, 1 = only status updates, 2 = status and brief
results, 3 = status and detailed results. Defaults to 3.
verbose: 0, 1, or 2. Verbosity mode.
0 = silent, 1 = default, 2 = verbose. Defaults to 1.
If the ``RAY_AIR_NEW_OUTPUT=1`` environment variable is set,
uses the new context-aware verbosity settings:
0 = silent, 1 = default, 2 = verbose.
uses the old verbosity settings:
0 = silent, 1 = only status updates, 2 = status and brief
results, 3 = status and detailed results.
progress_reporter: Progress reporter for reporting
intermediate experiment progress. Defaults to CLIReporter if
running in command-line, or JupyterNotebookReporter if running in
Expand Down

0 comments on commit 6e9dfd9

Please sign in to comment.