API Reference

This section contains the complete API reference for pydftracer.

Main Package

The main package exports all key functions and classes:

Core Tracing

  • dftracer - Main tracer class for logging events

  • dft_fn - Decorator for tracing functions

  • initialize - Initialize the DFTracer profiler

  • finalize - Finalize and cleanup the profiler

  • get_time - Get current timestamp for profiling

AI/ML Support

  • DFTracerAI - Base class for AI/ML tracing

  • Dynamo - PyTorch Dynamo integration class

  • dynamo - Pre-configured Dynamo instance for tracing

  • create_backend - Create a custom torch.compile backend with DFTracer

Configuration

  • DFTRACER_ENABLE - Check if DFTracer is enabled

  • DFTRACER_INIT_PRELOAD - Check initialization mode

  • DFTRACER_LOG_LEVEL - Current log level

Utilities

  • TagValue - Represent tagged values for events

  • TagType - Enum for tag types (KEY, VALUE, IGNORE)

  • TagDType - Enum for data types (INT, FLOAT, STRING)

Modules