Skip to content

Commit

Permalink
[Data] Remove set_progress_bars (#48203)
Browse files Browse the repository at this point in the history
Fixes #43576

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
  • Loading branch information
bveeramani authored Oct 22, 2024
1 parent 6e6600b commit 6e9a397
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 39 deletions.
1 change: 0 additions & 1 deletion doc/source/data/api/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@ Ray Data API
execution_options.rst
grouped_data.rst
data_context.rst
utility.rst
preprocessor.rst
from_other_data_libs.rst
12 changes: 0 additions & 12 deletions doc/source/data/api/utility.rst

This file was deleted.

2 changes: 0 additions & 2 deletions python/ray/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
NodeIdStr,
)
from ray.data._internal.logging import configure_logging
from ray.data._internal.progress_bar import set_progress_bars
from ray.data.context import DataContext, DatasetContext
from ray.data.dataset import Dataset, Schema
from ray.data.datasource import (
Expand Down Expand Up @@ -151,7 +150,6 @@
"read_sql",
"read_tfrecords",
"read_webdataset",
"set_progress_bars",
"Preprocessor",
"TFXReadOptions",
]
19 changes: 0 additions & 19 deletions python/ray/data/_internal/progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import ray
from ray.experimental import tqdm_ray
from ray.types import ObjectRef
from ray.util.annotations import Deprecated
from ray.util.debug import log_once

logger = logging.getLogger(__name__)
Expand All @@ -23,24 +22,6 @@
_canceled_threads_lock = threading.Lock()


@Deprecated
def set_progress_bars(enabled: bool) -> bool:
"""Set whether progress bars are enabled.
The default behavior is controlled by the
``RAY_DATA_DISABLE_PROGRESS_BARS`` environment variable. By default,
it is set to "0". Setting it to "1" will disable progress bars, unless
they are reenabled by this method.
Returns:
Whether progress bars were previously enabled.
"""
raise DeprecationWarning(
"`set_progress_bars` is deprecated. Set "
"`ray.data.DataContext.get_current().enable_progress_bars` instead.",
)


def extract_num_rows(result: Any) -> int:
"""Extract the number of rows from a result object.
Expand Down
5 changes: 0 additions & 5 deletions python/ray/data/tests/test_progress_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ def enable_tqdm_ray(request):
context.use_ray_tqdm = original_use_ray_tqdm


def test_set_progress_bars_is_deprecated():
with pytest.raises(DeprecationWarning):
ray.data.set_progress_bars(True)


def test_progress_bar(enable_tqdm_ray):
total = 10
# Used to record the total value of the bar at close
Expand Down

0 comments on commit 6e9a397

Please sign in to comment.