PyTracer: Automatically profiling numerical instabilities in Python
Fuente:
arXiv
Gespeichert in:
| Hauptverfasser: | , , , |
|---|---|
| Format: | Preprint |
| Veröffentlicht: |
2021
|
| Schlagworte: | |
| Online-Zugang: | |
| Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
| _version_ | 1866929559347134464 |
|---|---|
| author | Chatelain, Yohan Yong, Nigel Kiar, Gregory Glatard, Tristan |
| author_facet | Chatelain, Yohan Yong, Nigel Kiar, Gregory Glatard, Tristan |
| contents | Numerical stability is a crucial requirement of reliable scientific computing. However, despite the pervasiveness of Python in data science, analyzing large Python programs remains challenging due to the lack of scalable numerical analysis tools available for this language. To fill this gap, we developed PyTracer, a profiler to quantify numerical instability in Python applications. PyTracer transparently instruments Python code to produce numerical traces and visualize them interactively in a Plotly dashboard. We designed PyTracer to be agnostic to numerical noise model, allowing for tool evaluation through Monte-Carlo Arithmetic, random rounding, random data perturbation, or structured noise for a particular application. We illustrate PyTracer's capabilities by testing the numerical stability of key functions in both SciPy and Scikit-learn, two dominant Python libraries for mathematical modeling. Through these evaluations, we demonstrate PyTracer as a scalable, automatic, and generic framework for numerical profiling in Python. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2112_11508 |
| institution | arXiv |
| publishDate | 2021 |
| record_format | arxiv |
| spellingShingle | PyTracer: Automatically profiling numerical instabilities in Python Chatelain, Yohan Yong, Nigel Kiar, Gregory Glatard, Tristan Mathematical Software Numerical Analysis Software Engineering Numerical stability is a crucial requirement of reliable scientific computing. However, despite the pervasiveness of Python in data science, analyzing large Python programs remains challenging due to the lack of scalable numerical analysis tools available for this language. To fill this gap, we developed PyTracer, a profiler to quantify numerical instability in Python applications. PyTracer transparently instruments Python code to produce numerical traces and visualize them interactively in a Plotly dashboard. We designed PyTracer to be agnostic to numerical noise model, allowing for tool evaluation through Monte-Carlo Arithmetic, random rounding, random data perturbation, or structured noise for a particular application. We illustrate PyTracer's capabilities by testing the numerical stability of key functions in both SciPy and Scikit-learn, two dominant Python libraries for mathematical modeling. Through these evaluations, we demonstrate PyTracer as a scalable, automatic, and generic framework for numerical profiling in Python. |
| title | PyTracer: Automatically profiling numerical instabilities in Python |
| topic | Mathematical Software Numerical Analysis Software Engineering |
| url | https://arxiv.org/abs/2112.11508 |