Skip to content

Commit

Permalink
Optimize the display of task process bar (#3264)
Browse files Browse the repository at this point in the history
* Optimize the display of task process bar

* Remove unnecessary metrics initialization in ray communication

* Pin pandas version
  • Loading branch information
zhongchun committed Oct 11, 2022
1 parent 8e0d0e6 commit eacf12e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 5 additions & 1 deletion mars/deploy/oscar/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,11 @@ def __init__(self, show_progress):
else:
self.progress_bar = None
else:
self.progress_bar = tqdm(total=100)
self.progress_bar = tqdm(
total=100,
bar_format="{l_bar}{bar}| {n:6.2f}/{total_fmt} "
"[{elapsed}<{remaining}, {rate_fmt}{postfix}]",
)

self.last_progress: float = 0.0

Expand Down
7 changes: 1 addition & 6 deletions mars/oscar/backends/ray/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ def __reduce__(self):


@lazy_import_on_load(ray)
def _init_ray_metrics():
# Note: Must init metrics before using and here initializing metrics
# with ray backend.
from ....metrics import init_metrics

init_metrics("ray")
def _init_ray_serialization_deserialization():
_ray_serialize = ray.serialization.SerializationContext.serialize
_ray_deserialize_object = ray.serialization.SerializationContext._deserialize_object
serialized_bytes_counter = Metrics.counter(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include_package_data = True
packages = find:
install_requires =
numpy>=1.14.0
pandas>=1.0.0
pandas>=1.1.0,<=1.4.4
scipy>=1.0.0
scikit-learn>=0.20
numexpr>=2.6.4
Expand Down

0 comments on commit eacf12e

Please sign in to comment.