Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Wu committed Jan 22, 2022
1 parent 1b3760e commit e1e2f51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dashboard/modules/reporter/reporter_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from ray._private.gcs_utils import use_gcs_for_bootstrap
from ray.core.generated import reporter_pb2
from ray.core.generated import reporter_pb2_grpc
from ray.autoscaler._private.util import (DEBUG_AUTOSCALING_STATUS)
from ray.ray_constants import DEBUG_AUTOSCALING_STATUS
from ray._private.metrics_agent import MetricsAgent, Gauge, Record
from ray.util.debug import log_once
import psutil
Expand Down
9 changes: 4 additions & 5 deletions python/ray/autoscaler/_private/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
from ray.autoscaler._private.load_metrics import LoadMetrics
from ray.autoscaler._private.constants import \
AUTOSCALER_MAX_RESOURCE_DEMAND_VECTOR_SIZE
from ray.autoscaler._private.util import DEBUG_AUTOSCALING_STATUS, \
DEBUG_AUTOSCALING_ERROR, format_readonly_node_type
from ray.autoscaler._private.util import format_readonly_node_type

from ray.core.generated import gcs_service_pb2, gcs_service_pb2_grpc
import ray.ray_constants as ray_constants
Expand Down Expand Up @@ -363,7 +362,7 @@ def _run(self):
as_json = json.dumps(status)
if _internal_kv_initialized():
_internal_kv_put(
DEBUG_AUTOSCALING_STATUS, as_json, overwrite=True)
ray_constants.DEBUG_AUTOSCALING_STATUS, as_json, overwrite=True)
except Exception:
logger.exception(
"Monitor: Execution exception. Trying again...")
Expand Down Expand Up @@ -433,7 +432,7 @@ def _handle_failure(self, error):
# drivers.
message = f"The autoscaler failed with the following error:\n{error}"
if _internal_kv_initialized():
_internal_kv_put(DEBUG_AUTOSCALING_ERROR, message, overwrite=True)
_internal_kv_put(ray_constants.DEBUG_AUTOSCALING_ERROR, message, overwrite=True)
if not use_gcs_for_bootstrap():
redis_client = ray._private.services.create_redis_client(
self.redis_address, password=self.redis_password)
Expand Down Expand Up @@ -466,7 +465,7 @@ def run(self):
try:
if _internal_kv_initialized():
# Delete any previous autoscaling errors.
_internal_kv_del(DEBUG_AUTOSCALING_ERROR)
_internal_kv_del(ray_constants.DEBUG_AUTOSCALING_ERROR)
self._initialize_autoscaler()
self._run()
except Exception:
Expand Down

0 comments on commit e1e2f51

Please sign in to comment.