Пример #1
0
def get_ray_status_output(address):
    redis_client = ray._private.services.create_redis_client(address, "")
    status = redis_client.hget(DEBUG_AUTOSCALING_STATUS, "value")
    error = redis_client.hget(DEBUG_AUTOSCALING_ERROR, "value")
    return {
        "demand": debug_status(
            status, error).split("Demands:")[1].strip("\n").strip(" "),
        "usage": debug_status(status, error).split("Demands:")[0].split(
            "Usage:")[1].strip("\n").strip(" ")
    }
def get_ray_status_output(address):
    redis_client = ray._private.services.create_redis_client(address, "")
    gcs_client = gcs_utils.GcsClient.create_from_redis(redis_client)
    internal_kv._initialize_internal_kv(gcs_client)
    status = internal_kv._internal_kv_get(DEBUG_AUTOSCALING_STATUS)
    error = internal_kv._internal_kv_get(DEBUG_AUTOSCALING_ERROR)
    return {
        "demand": debug_status(
            status, error).split("Demands:")[1].strip("\n").strip(" "),
        "usage": debug_status(status, error).split("Demands:")[0].split(
            "Usage:")[1].strip("\n").strip(" ")
    }
Пример #3
0
def get_ray_status_output(address):
    gcs_client = gcs_utils.GcsClient(address=address)
    internal_kv._initialize_internal_kv(gcs_client)
    status = internal_kv._internal_kv_get(DEBUG_AUTOSCALING_STATUS)
    error = internal_kv._internal_kv_get(DEBUG_AUTOSCALING_ERROR)
    return {
        "demand":
        debug_status(status,
                     error).split("Demands:")[1].strip("\n").strip(" "),
        "usage":
        debug_status(status, error).split("Demands:")[0].split("Usage:")
        [1].strip("\n").strip(" "),
    }
Пример #4
0
def status(address):
    """Print cluster status, including autoscaling info."""
    if not address:
        address = services.get_ray_address_to_use_or_die()
    logger.info(f"Connecting to Ray instance at {address}.")
    ray.init(address=address)
    print(debug_status())