metrics.py 23 KB

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