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 eventsdft_fn- Decorator for tracing functionsinitialize- Initialize the DFTracer profilerfinalize- Finalize and cleanup the profilerget_time- Get current timestamp for profiling
AI/ML Support
DFTracerAI- Base class for AI/ML tracingDynamo- PyTorch Dynamo integration classdynamo- Pre-configured Dynamo instance for tracingcreate_backend- Create a custom torch.compile backend with DFTracer
Configuration
DFTRACER_ENABLE- Check if DFTracer is enabledDFTRACER_INIT_PRELOAD- Check initialization modeDFTRACER_LOG_LEVEL- Current log level
Utilities
TagValue- Represent tagged values for eventsTagType- Enum for tag types (KEY, VALUE, IGNORE)TagDType- Enum for data types (INT, FLOAT, STRING)
Modules
Core API - Core tracing functionality (logger, common utilities)
AI/ML API - AI/ML specific tracing features
Dynamo API - PyTorch Dynamo integration
Environment Configuration - Environment configuration and setup