Remove colorful from ray core (#10723)

This commit is contained in:
Eric Liang
2020-09-10 18:41:59 -07:00
committed by GitHub
parent 7eaf063f29
commit cbc52a2a42
5 changed files with 7 additions and 55 deletions
+3 -14
View File
@@ -13,13 +13,11 @@ import sys
import time
import colorama
import colorful as cf
import psutil
# Ray modules
import ray
import ray.ray_constants as ray_constants
import redis
from ray.autoscaler.cli_logger import cli_logger
resource = None
if sys.platform != "win32":
@@ -550,12 +548,6 @@ def wait_for_redis_to_start(redis_ip_address, redis_port, password=None):
else:
break
else:
cli_logger.error(
"Unable to connect to Redis at "
"`{c.underlined}{}:{}{c.no_underlined}` after {} retries.",
redis_ip_address, redis_port, num_retries)
cli_logger.abort("Check your firewall and network settings.")
raise RuntimeError("Unable to connect to Redis. If the Redis instance "
"is on a different machine, check that your "
"firewall is configured properly.")
@@ -1168,12 +1160,9 @@ def start_dashboard(require_dashboard,
dashboard_url = (
f"{host if host != '0.0.0.0' else get_node_ip_address()}:{port}")
cli_logger.labeled_value("Dashboard URL", cf.underlined("http://{}"),
dashboard_url)
cli_logger.old_info(logger, "View the Ray dashboard at {}{}{}{}{}",
colorama.Style.BRIGHT, colorama.Fore.GREEN,
dashboard_url, colorama.Fore.RESET,
colorama.Style.NORMAL)
logger.info("View the Ray dashboard at {}{}http://{}{}{}".format(
colorama.Style.BRIGHT, colorama.Fore.GREEN, dashboard_url,
colorama.Fore.RESET, colorama.Style.NORMAL))
return dashboard_url, process_info
else: