New Release of py-spy-tui 0.1.3 Enhances Py-Spy Functionality
The release of py-spy-tui version 0.1.3 brings a new terminal user interface for the py-spy profiler, designed to enhance usability for developers. This Rust-based tool allows users to install it seamlessly alongside the py-spy Python package, ensuring that the profiler binary is available on supported platforms.
When users select a group, py-spy-tui executes a separate py-spy command for each process. This feature is particularly beneficial for torchrun and distributed PyTorch training, where processes often operate as siblings rather than as children of a single attach target.
Each profiling session generates a report folder in the current directory, which includes a raw folder containing py-spy's original SVG records. Additionally, a human-readable report.md and a structured report.json are created, allowing users to analyze performance metrics such as hot frames, rank imbalance, blocking stacks, and data-loading stalls.
For Linux users, attaching to an existing process may require elevated permissions. However, py-spy-tui offers a solution for same-user profiling without the need for sudo by modifying the system-wide ptrace policy for debugging. Users can also opt to use sudo from the TUI if they prefer not to alter host settings.
The release process for Linux wheels has been optimized to build as musllinux, eliminating the dependency on the target machine's glibc version. Users can download the appropriate file for their platform, with guidance available for those unsure about which package to choose.
This version not only simplifies installation but also enhances the overall profiling experience for developers working with Python applications, particularly in complex distributed environments.