Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[air/output] Switch on per default #35389

Merged
merged 5 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update docstring again to reflect this? 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah, updated!

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