metrics.py 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. from typing import TYPE_CHECKING
  2. from typing import Counter as CollectionsCounter
  3. from typing import Dict, List, Optional, Union
  4. import numpy as np
  5. import prometheus_client
  6. from loguru import logger
  7. from aphrodite.engine.metrics_types import (StatLoggerBase, Stats,
  8. SupportsMetricsInfo)
  9. from aphrodite.executor.ray_utils import ray
  10. if ray is not None:
  11. from ray.util import metrics as ray_metrics
  12. else:
  13. ray_metrics = None
  14. if TYPE_CHECKING:
  15. from aphrodite.spec_decode.metrics import SpecDecodeWorkerMetrics
  16. prometheus_client.disable_created_metrics()
  17. # The begin-* and end* here are used by the documentation generator
  18. # to extract the metrics definitions.
  19. # begin-metrics-definitions
  20. class Metrics:
  21. """
  22. Aphrodite uses a multiprocessing-based frontend for the OpenAI server.
  23. This means that we need to run prometheus_client in multiprocessing mode
  24. See https://prometheus.github.io/client_python/multiprocess/ for more
  25. details on limitations.
  26. """
  27. labelname_finish_reason = "finished_reason"
  28. _gauge_cls = prometheus_client.Gauge
  29. _counter_cls = prometheus_client.Counter
  30. _histogram_cls = prometheus_client.Histogram
  31. def __init__(self, labelnames: List[str], max_model_len: int):
  32. # Unregister any existing Aphrodite collectors (for CI/CD)
  33. self._unregister_aphrodite_metrics()
  34. # System stats
  35. # Scheduler State
  36. self.gauge_scheduler_running = self._gauge_cls(
  37. name="aphrodite:num_requests_running",
  38. documentation="Number of requests currently running on GPU.",
  39. labelnames=labelnames,
  40. multiprocess_mode="sum")
  41. self.gauge_scheduler_waiting = self._gauge_cls(
  42. name="aphrodite:num_requests_waiting",
  43. documentation="Number of requests waiting to be processed.",
  44. labelnames=labelnames,
  45. multiprocess_mode="sum")
  46. self.gauge_scheduler_swapped = self._gauge_cls(
  47. name="aphrodite:num_requests_swapped",
  48. documentation="Number of requests swapped to CPU.",
  49. labelnames=labelnames,
  50. multiprocess_mode="sum")
  51. # KV Cache Usage in %
  52. self.gauge_gpu_cache_usage = self._gauge_cls(
  53. name="aphrodite:gpu_cache_usage_perc",
  54. documentation="GPU KV-cache usage. 1 means 100 percent usage.",
  55. labelnames=labelnames,
  56. multiprocess_mode="sum")
  57. self.gauge_cpu_cache_usage = self._gauge_cls(
  58. name="aphrodite:cpu_cache_usage_perc",
  59. documentation="CPU KV-cache usage. 1 means 100 percent usage.",
  60. labelnames=labelnames,
  61. multiprocess_mode="sum")
  62. # Prefix caching block hit rate
  63. self.gauge_cpu_prefix_cache_hit_rate = self._gauge_cls(
  64. name="aphrodite:cpu_prefix_cache_hit_rate",
  65. documentation="CPU prefix cache block hit rate.",
  66. labelnames=labelnames,
  67. multiprocess_mode="sum")
  68. self.gauge_gpu_prefix_cache_hit_rate = self._gauge_cls(
  69. name="aphrodite:gpu_prefix_cache_hit_rate",
  70. documentation="GPU prefix cache block hit rate.",
  71. labelnames=labelnames,
  72. multiprocess_mode="sum")
  73. # Iteration stats
  74. self.counter_num_preemption = self._counter_cls(
  75. name="aphrodite:num_preemptions_total",
  76. documentation="Cumulative number of preemption from the engine.",
  77. labelnames=labelnames)
  78. self.counter_prompt_tokens = self._counter_cls(
  79. name="aphrodite:prompt_tokens_total",
  80. documentation="Number of prefill tokens processed.",
  81. labelnames=labelnames)
  82. self.counter_generation_tokens = self._counter_cls(
  83. name="aphrodite:generation_tokens_total",
  84. documentation="Number of generation tokens processed.",
  85. labelnames=labelnames)
  86. self.histogram_time_to_first_token = self._histogram_cls(
  87. name="aphrodite:time_to_first_token_seconds",
  88. documentation="Histogram of time to first token in seconds.",
  89. labelnames=labelnames,
  90. buckets=[
  91. 0.001, 0.005, 0.01, 0.02, 0.04, 0.06, 0.08, 0.1, 0.25, 0.5,
  92. 0.75, 1.0, 2.5, 5.0, 7.5, 10.0
  93. ])
  94. self.histogram_time_per_output_token = self._histogram_cls(
  95. name="aphrodite:time_per_output_token_seconds",
  96. documentation="Histogram of time per output token in seconds.",
  97. labelnames=labelnames,
  98. buckets=[
  99. 0.01, 0.025, 0.05, 0.075, 0.1, 0.15, 0.2, 0.3, 0.4, 0.5, 0.75,
  100. 1.0, 2.5
  101. ])
  102. # Request stats
  103. # Latency
  104. self.histogram_e2e_time_request = self._histogram_cls(
  105. name="aphrodite:e2e_request_latency_seconds",
  106. documentation="Histogram of end to end request latency in seconds.",
  107. labelnames=labelnames,
  108. buckets=[1.0, 2.5, 5.0, 10.0, 15.0, 20.0, 30.0, 40.0, 50.0, 60.0])
  109. # Metadata
  110. self.histogram_num_prompt_tokens_request = self._histogram_cls(
  111. name="aphrodite:request_prompt_tokens",
  112. documentation="Number of prefill tokens processed.",
  113. labelnames=labelnames,
  114. buckets=build_1_2_5_buckets(max_model_len),
  115. )
  116. self.histogram_num_generation_tokens_request = \
  117. self._histogram_cls(
  118. name="aphrodite:request_generation_tokens",
  119. documentation="Number of generation tokens processed.",
  120. labelnames=labelnames,
  121. buckets=build_1_2_5_buckets(max_model_len),
  122. )
  123. self.histogram_best_of_request = self._histogram_cls(
  124. name="aphrodite:request_params_best_of",
  125. documentation="Histogram of the best_of request parameter.",
  126. labelnames=labelnames,
  127. buckets=[1, 2, 5, 10, 20],
  128. )
  129. self.histogram_n_request = self._histogram_cls(
  130. name="aphrodite:request_params_n",
  131. documentation="Histogram of the n request parameter.",
  132. labelnames=labelnames,
  133. buckets=[1, 2, 5, 10, 20],
  134. )
  135. self.counter_request_success = self._counter_cls(
  136. name="aphrodite:request_success_total",
  137. documentation="Count of successfully processed requests.",
  138. labelnames=labelnames + [Metrics.labelname_finish_reason])
  139. # Speculatie decoding stats
  140. self.gauge_spec_decode_draft_acceptance_rate = self._gauge_cls(
  141. name="aphrodite:spec_decode_draft_acceptance_rate",
  142. documentation="Speulative token acceptance rate.",
  143. labelnames=labelnames,
  144. multiprocess_mode="sum")
  145. self.gauge_spec_decode_efficiency = self._gauge_cls(
  146. name="aphrodite:spec_decode_efficiency",
  147. documentation="Speculative decoding system efficiency.",
  148. labelnames=labelnames,
  149. multiprocess_mode="sum")
  150. self.counter_spec_decode_num_accepted_tokens = (self._counter_cls(
  151. name="aphrodite:spec_decode_num_accepted_tokens_total",
  152. documentation="Number of accepted tokens.",
  153. labelnames=labelnames))
  154. self.counter_spec_decode_num_draft_tokens = self._counter_cls(
  155. name="aphrodite:spec_decode_num_draft_tokens_total",
  156. documentation="Number of draft tokens.",
  157. labelnames=labelnames)
  158. self.counter_spec_decode_num_emitted_tokens = (self._counter_cls(
  159. name="aphrodite:spec_decode_num_emitted_tokens_total",
  160. documentation="Number of emitted tokens.",
  161. labelnames=labelnames))
  162. # Deprecated in favor of aphrodite:prompt_tokens_total
  163. self.gauge_avg_prompt_throughput = self._gauge_cls(
  164. name="aphrodite:avg_prompt_throughput_toks_per_s",
  165. documentation="Average prefill throughput in tokens/s.",
  166. labelnames=labelnames,
  167. multiprocess_mode="sum",
  168. )
  169. # Deprecated in favor of aphrodite:generation_tokens_total
  170. self.gauge_avg_generation_throughput = self._gauge_cls(
  171. name="aphrodite:avg_generation_throughput_toks_per_s",
  172. documentation="Average generation throughput in tokens/s.",
  173. labelnames=labelnames,
  174. multiprocess_mode="sum",
  175. )
  176. # end-metrics-definitions
  177. def _unregister_aphrodite_metrics(self) -> None:
  178. for collector in list(prometheus_client.REGISTRY._collector_to_names):
  179. if hasattr(collector, "_name") and "aphrodite" in collector._name:
  180. prometheus_client.REGISTRY.unregister(collector)
  181. class _RayGaugeWrapper:
  182. """Wraps around ray.util.metrics.Gauge to provide same API as
  183. prometheus_client.Gauge"""
  184. def __init__(self,
  185. name: str,
  186. documentation: str = "",
  187. labelnames: Optional[List[str]] = None,
  188. multiprocess_mode: str = ""):
  189. del multiprocess_mode
  190. labelnames_tuple = tuple(labelnames) if labelnames else None
  191. self._gauge = ray_metrics.Gauge(name=name,
  192. description=documentation,
  193. tag_keys=labelnames_tuple)
  194. def labels(self, **labels):
  195. self._gauge.set_default_tags(labels)
  196. return self
  197. def set(self, value: Union[int, float]):
  198. return self._gauge.set(value)
  199. class _RayCounterWrapper:
  200. """Wraps around ray.util.metrics.Counter to provide same API as
  201. prometheus_client.Counter"""
  202. def __init__(self,
  203. name: str,
  204. documentation: str = "",
  205. labelnames: Optional[List[str]] = None):
  206. labelnames_tuple = tuple(labelnames) if labelnames else None
  207. self._counter = ray_metrics.Counter(name=name,
  208. description=documentation,
  209. tag_keys=labelnames_tuple)
  210. def labels(self, **labels):
  211. self._counter.set_default_tags(labels)
  212. return self
  213. def inc(self, value: Union[int, float] = 1.0):
  214. if value == 0:
  215. return
  216. return self._counter.inc(value)
  217. class _RayHistogramWrapper:
  218. """Wraps around ray.util.metrics.Histogram to provide same API as
  219. prometheus_client.Histogram"""
  220. def __init__(self,
  221. name: str,
  222. documentation: str = "",
  223. labelnames: Optional[List[str]] = None,
  224. buckets: Optional[List[float]] = None):
  225. labelnames_tuple = tuple(labelnames) if labelnames else None
  226. self._histogram = ray_metrics.Histogram(name=name,
  227. description=documentation,
  228. tag_keys=labelnames_tuple,
  229. boundaries=buckets)
  230. def labels(self, **labels):
  231. self._histogram.set_default_tags(labels)
  232. return self
  233. def observe(self, value: Union[int, float]):
  234. return self._histogram.observe(value)
  235. class RayMetrics(Metrics):
  236. """
  237. RayMetrics is used by RayPrometheusStatLogger to log to Ray metrics.
  238. Provides the same metrics as Metrics but uses Ray's util.metrics library.
  239. """
  240. _gauge_cls = _RayGaugeWrapper
  241. _counter_cls = _RayCounterWrapper
  242. _histogram_cls = _RayHistogramWrapper
  243. def __init__(self, labelnames: List[str], max_model_len: int):
  244. if ray_metrics is None:
  245. raise ImportError("RayMetrics requires Ray to be installed.")
  246. super().__init__(labelnames, max_model_len)
  247. def _unregister_aphrodite_metrics(self) -> None:
  248. # No-op on purpose
  249. pass
  250. def build_1_2_5_buckets(max_value: int) -> List[int]:
  251. """
  252. Builds a list of buckets with increasing powers of 10 multiplied by
  253. mantissa values (1, 2, 5) until the value exceeds the specified maximum.
  254. Example:
  255. >>> build_1_2_5_buckets(100)
  256. [1, 2, 5, 10, 20, 50, 100]
  257. """
  258. mantissa_lst = [1, 2, 5]
  259. exponent = 0
  260. buckets: List[int] = []
  261. while True:
  262. for m in mantissa_lst:
  263. value = m * 10**exponent
  264. if value <= max_value:
  265. buckets.append(value)
  266. else:
  267. return buckets
  268. exponent += 1
  269. def local_interval_elapsed(now: float, last_log: float,
  270. local_interval: float) -> bool:
  271. elapsed_time = now - last_log
  272. return elapsed_time > local_interval
  273. def get_throughput(tracked_stats: List[int], now: float,
  274. last_log: float) -> float:
  275. return float(np.sum(tracked_stats) / (now - last_log))
  276. class LoggingStatLogger(StatLoggerBase):
  277. """LoggingStatLogger is used in LLMEngine to log to Stdout."""
  278. def log(self, stats: Stats) -> None:
  279. """Called by LLMEngine.
  280. Logs to Stdout every self.local_interval seconds."""
  281. # Save tracked stats for token counters.
  282. self.num_prompt_tokens.append(stats.num_prompt_tokens_iter)
  283. self.num_generation_tokens.append(stats.num_generation_tokens_iter)
  284. # Update spec decode metrics
  285. self.maybe_update_spec_decode_metrics(stats)
  286. # Log locally every local_interval seconds.
  287. if local_interval_elapsed(stats.now, self.last_local_log,
  288. self.local_interval):
  289. # Compute summary metrics for tracked stats (and log them
  290. # to promethus if applicable).
  291. prompt_throughput = get_throughput(self.num_prompt_tokens,
  292. now=stats.now,
  293. last_log=self.last_local_log)
  294. generation_throughput = get_throughput(
  295. self.num_generation_tokens,
  296. now=stats.now,
  297. last_log=self.last_local_log)
  298. # Log to stdout.
  299. logger.info(
  300. f"Avg prompt throughput: {prompt_throughput:.1f} tokens/s, "
  301. f"Avg generation throughput: {generation_throughput:.1f} "
  302. "tokens/s, "
  303. f"Running: {stats.num_running_sys} reqs, "
  304. f"Swapped: {stats.num_swapped_sys} reqs, "
  305. f"Pending: {stats.num_waiting_sys} reqs, "
  306. f"GPU KV cache usage: {stats.gpu_cache_usage_sys * 100:.1f}%, "
  307. f"CPU KV cache usage: {stats.cpu_cache_usage_sys * 100:.1f}%."
  308. )
  309. if (stats.cpu_prefix_cache_hit_rate >= 0
  310. or stats.gpu_prefix_cache_hit_rate >= 0):
  311. logger.info(
  312. "Prefix cache hit rate: "
  313. f"GPU: {stats.gpu_prefix_cache_hit_rate * 100:.2f}%, "
  314. f"CPU: {stats.cpu_prefix_cache_hit_rate * 100:.2f}%")
  315. if self.spec_decode_metrics is not None:
  316. logger.info(
  317. self._format_spec_decode_metrics_str(
  318. self.spec_decode_metrics))
  319. # Reset tracked stats for next interval.
  320. self.num_prompt_tokens = []
  321. self.num_generation_tokens = []
  322. self.last_local_log = stats.now
  323. self.spec_decode_metrics = None
  324. def _format_spec_decode_metrics_str(
  325. self, metrics: "SpecDecodeWorkerMetrics") -> str:
  326. return ("Speculative metrics: "
  327. f"Draft acceptance rate: {metrics.draft_acceptance_rate:.3f}, "
  328. f"System efficiency: {metrics.system_efficiency:.3f}, "
  329. f"Number of speculative tokens: {metrics.num_spec_tokens}, "
  330. f"Number of accepted tokens: {metrics.accepted_tokens}, "
  331. f"Number of draft tokens: {metrics.draft_tokens}, "
  332. f"Number of emitted tokens: {metrics.emitted_tokens}.")
  333. def info(self, type: str, obj: SupportsMetricsInfo) -> None:
  334. raise NotImplementedError
  335. class PrometheusStatLogger(StatLoggerBase):
  336. """PrometheusStatLogger is used LLMEngine to log to Promethus."""
  337. _metrics_cls = Metrics
  338. _gauge_cls = prometheus_client.Gauge
  339. def __init__(self, local_interval: float, labels: Dict[str, str],
  340. max_model_len: int) -> None:
  341. super().__init__(local_interval)
  342. # Prometheus metrics
  343. self.labels = labels
  344. self.metrics = self._metrics_cls(labelnames=list(labels.keys()),
  345. max_model_len=max_model_len)
  346. def _log_gauge(self, gauge, data: Union[int, float]) -> None:
  347. # Convenience function for logging to gauge.
  348. gauge.labels(**self.labels).set(data)
  349. def _log_counter(self, counter, data: Union[int, float]) -> None:
  350. # Convenience function for logging to counter.
  351. counter.labels(**self.labels).inc(data)
  352. def _log_counter_labels(self, counter, data: CollectionsCounter,
  353. label_key: str) -> None:
  354. # Convenience function for collection counter of labels.
  355. for label, count in data.items():
  356. counter.labels(**{**self.labels, label_key: label}).inc(count)
  357. def _log_histogram(self, histogram, data: Union[List[int],
  358. List[float]]) -> None:
  359. # Convenience function for logging list to histogram.
  360. for datum in data:
  361. histogram.labels(**self.labels).observe(datum)
  362. def _log_prometheus(self, stats: Stats) -> None:
  363. # System state data
  364. self._log_gauge(self.metrics.gauge_scheduler_running,
  365. stats.num_running_sys)
  366. self._log_gauge(self.metrics.gauge_scheduler_swapped,
  367. stats.num_swapped_sys)
  368. self._log_gauge(self.metrics.gauge_scheduler_waiting,
  369. stats.num_waiting_sys)
  370. self._log_gauge(self.metrics.gauge_gpu_cache_usage,
  371. stats.gpu_cache_usage_sys)
  372. self._log_gauge(self.metrics.gauge_cpu_cache_usage,
  373. stats.cpu_cache_usage_sys)
  374. self._log_gauge(self.metrics.gauge_cpu_prefix_cache_hit_rate,
  375. stats.cpu_prefix_cache_hit_rate)
  376. self._log_gauge(self.metrics.gauge_gpu_prefix_cache_hit_rate,
  377. stats.gpu_prefix_cache_hit_rate)
  378. # Iteration level data
  379. self._log_counter(self.metrics.counter_num_preemption,
  380. stats.num_preemption_iter)
  381. self._log_counter(self.metrics.counter_prompt_tokens,
  382. stats.num_prompt_tokens_iter)
  383. self._log_counter(self.metrics.counter_generation_tokens,
  384. stats.num_generation_tokens_iter)
  385. self._log_histogram(self.metrics.histogram_time_to_first_token,
  386. stats.time_to_first_tokens_iter)
  387. self._log_histogram(self.metrics.histogram_time_per_output_token,
  388. stats.time_per_output_tokens_iter)
  389. # Request level data
  390. # Latency
  391. self._log_histogram(self.metrics.histogram_e2e_time_request,
  392. stats.time_e2e_requests)
  393. # Metadata
  394. finished_reason_counter = CollectionsCounter(
  395. stats.finished_reason_requests)
  396. self._log_counter_labels(self.metrics.counter_request_success,
  397. finished_reason_counter,
  398. Metrics.labelname_finish_reason)
  399. self._log_histogram(self.metrics.histogram_num_prompt_tokens_request,
  400. stats.num_prompt_tokens_requests)
  401. self._log_histogram(
  402. self.metrics.histogram_num_generation_tokens_request,
  403. stats.num_generation_tokens_requests)
  404. self._log_histogram(self.metrics.histogram_n_request, stats.n_requests)
  405. self._log_histogram(self.metrics.histogram_best_of_request,
  406. stats.best_of_requests)
  407. def _log_prometheus_interval(self, prompt_throughput: float,
  408. generation_throughput: float) -> None:
  409. # Logs metrics to prometheus that are computed every logging_interval.
  410. # Support legacy gauge metrics that make throughput calculations on
  411. # the Aphrodite side. Moving forward, we should use counters like
  412. # counter_prompt_tokens, counter_generation_tokens
  413. # Which log raw data and calculate summaries using rate() on the
  414. # grafana/prometheus side.
  415. self.metrics.gauge_avg_prompt_throughput.labels(
  416. **self.labels).set(prompt_throughput)
  417. self.metrics.gauge_avg_generation_throughput.labels(
  418. **self.labels).set(generation_throughput)
  419. def log(self, stats: Stats):
  420. """Logs to prometheus and tracked stats every iteration."""
  421. # Log to prometheus.
  422. self._log_prometheus(stats)
  423. # Save tracked stats for token counters.
  424. self.num_prompt_tokens.append(stats.num_prompt_tokens_iter)
  425. self.num_generation_tokens.append(stats.num_generation_tokens_iter)
  426. # Update spec decode metrics
  427. self.maybe_update_spec_decode_metrics(stats)
  428. # Log locally every local_interval seconds.
  429. if local_interval_elapsed(stats.now, self.last_local_log,
  430. self.local_interval):
  431. # Compute summary metrics for tracked stats (and log them
  432. # to promethus if applicable).
  433. prompt_throughput = get_throughput(self.num_prompt_tokens,
  434. now=stats.now,
  435. last_log=self.last_local_log)
  436. generation_throughput = get_throughput(
  437. self.num_generation_tokens,
  438. now=stats.now,
  439. last_log=self.last_local_log)
  440. self._log_prometheus_interval(
  441. prompt_throughput=prompt_throughput,
  442. generation_throughput=generation_throughput)
  443. if self.spec_decode_metrics is not None:
  444. self._log_gauge(
  445. self.metrics.gauge_spec_decode_draft_acceptance_rate,
  446. self.spec_decode_metrics.draft_acceptance_rate)
  447. self._log_gauge(self.metrics.gauge_spec_decode_efficiency,
  448. self.spec_decode_metrics.system_efficiency)
  449. self._log_counter(
  450. self.metrics.counter_spec_decode_num_accepted_tokens,
  451. self.spec_decode_metrics.accepted_tokens)
  452. self._log_counter(
  453. self.metrics.counter_spec_decode_num_draft_tokens,
  454. self.spec_decode_metrics.draft_tokens)
  455. self._log_counter(
  456. self.metrics.counter_spec_decode_num_emitted_tokens,
  457. self.spec_decode_metrics.emitted_tokens)
  458. # Reset tracked stats for next interval.
  459. self.num_prompt_tokens = []
  460. self.num_generation_tokens = []
  461. self.last_local_log = stats.now
  462. self.spec_decode_metrics = None
  463. def info(self, type: str, obj: SupportsMetricsInfo) -> None:
  464. # Info type metrics are syntactic sugar for a gauge permanently set to 1
  465. # Since prometheus multiprocessing mode does not support Info, emulate
  466. # info here with a gauge.
  467. if type == "cache_config":
  468. metrics_info = obj.metrics_info()
  469. info_gauge = self._gauge_cls(
  470. name="aphrodite:cache_config_info",
  471. documentation="Information of the LLMEngine CacheConfig",
  472. labelnames=metrics_info.keys(),
  473. multiprocess_mode="mostrecent")
  474. info_gauge.labels(**metrics_info).set(1)
  475. class RayPrometheusStatLogger(PrometheusStatLogger):
  476. """RayPrometheusStatLogger uses Ray metrics instead."""
  477. _metrics_cls = RayMetrics
  478. def info(self, type: str, obj: SupportsMetricsInfo) -> None:
  479. return None