Exemplo n.º 1
0
    if isinstance(o, dict):
        D = {k: recursive_asdict(v) for k, v in o.items()}
        return D

    return o


def jsonify_asdict(o):
    return json.dumps(dashboard_utils.to_google_style(recursive_asdict(o)))


# A list of gauges to record and export metrics.
METRICS_GAUGES = {
    "node_cpu_utilization":
    Gauge("node_cpu_utilization", "Total CPU usage on a ray node",
          "percentage", ["ip"]),
    "node_cpu_count":
    Gauge("node_cpu_count", "Total CPUs available on a ray node", "cores",
          ["ip"]),
    "node_mem_used":
    Gauge("node_mem_used", "Memory usage on a ray node", "bytes", ["ip"]),
    "node_mem_available":
    Gauge("node_mem_available", "Memory available on a ray node", "bytes",
          ["ip"]),
    "node_mem_total":
    Gauge("node_mem_total", "Total memory on a ray node", "bytes", ["ip"]),
    "node_gpus_available":
    Gauge("node_gpus_available", "Total GPUs available on a ray node",
          "percentage", ["ip"]),
    "node_gpus_utilization":
    Gauge("node_gpus_utilization", "Total GPUs usage on a ray node",
Exemplo n.º 2
0
    if isinstance(o, dict):
        D = {k: recursive_asdict(v) for k, v in o.items()}
        return D

    return o


def jsonify_asdict(o):
    return json.dumps(dashboard_utils.to_google_style(recursive_asdict(o)))


# A list of gauges to record and export metrics.
METRICS_GAUGES = {
    "node_cpu_utilization": Gauge("node_cpu_utilization",
                                  "Total CPU usage on a ray node",
                                  "percentage", ["ip"]),
    "node_cpu_count": Gauge("node_cpu_count",
                            "Total CPUs available on a ray node", "cores",
                            ["ip"]),
    "node_mem_used": Gauge("node_mem_used", "Memory usage on a ray node",
                           "bytes", ["ip"]),
    "node_mem_available": Gauge("node_mem_available",
                                "Memory available on a ray node", "bytes",
                                ["ip"]),
    "node_mem_total": Gauge("node_mem_total", "Total memory on a ray node",
                            "bytes", ["ip"]),
    "node_gpus_available": Gauge("node_gpus_available",
                                 "Total GPUs available on a ray node",
                                 "percentage", ["ip"]),
    "node_gpus_utilization": Gauge("node_gpus_utilization",
Exemplo n.º 3
0
    if isinstance(o, dict):
        D = {k: recursive_asdict(v) for k, v in o.items()}
        return D

    return o


def jsonify_asdict(o) -> str:
    return json.dumps(dashboard_utils.to_google_style(recursive_asdict(o)))


# A list of gauges to record and export metrics.
METRICS_GAUGES = {
    "node_cpu_utilization":
    Gauge("node_cpu_utilization", "Total CPU usage on a ray node",
          "percentage", ["ip"]),
    "node_cpu_count":
    Gauge("node_cpu_count", "Total CPUs available on a ray node", "cores",
          ["ip"]),
    "node_mem_used":
    Gauge("node_mem_used", "Memory usage on a ray node", "bytes", ["ip"]),
    "node_mem_available":
    Gauge("node_mem_available", "Memory available on a ray node", "bytes",
          ["ip"]),
    "node_mem_total":
    Gauge("node_mem_total", "Total memory on a ray node", "bytes", ["ip"]),
    "node_gpus_available":
    Gauge(
        "node_gpus_available",
        "Total GPUs available on a ray node",
        "percentage",