Statsd Instruments

To use statsd instrumentation, install with the statsd extra:

pip install sklearn-instrumentation[statsd]
class sklearn_instrumentation.instruments.statsd.StatsdTimer(client: statsd.client.udp.StatsClient, enumerate_: bool = False)[source]

Instrument which times function calls with statsd.

dkwargs can contain a prefix field which gets prefixed to the statsd timer label.

Parameters
  • client (statsd.StatsClient) – A statsd client

  • enumerate_ (bool) – Whether to enumerate multiple instances of the same estimator type by appending the qualname with “-N” where N is the count of estimator types found in the estimator hierarchy