gh-153804: `_remote_debugging`: Tachyon Oracle by maurycy · Pull Request #153806 · python/cpython · GitHub
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Footer
You can’t perform that action at this time.
Please read #153804 for raison d'être.
The ultimate idea is that instead of "I generated a small script with Claude, therefore we're better than we were" we repeatedly and rigorously measure and ensure that our changes to the profiler do not make things worse or, even sometimes, improve the reported data.
The PR introduces a new script suited for Tachyon, named Tools/inspection/oracle_external_inspection.py, mostly reusing the snippets from Tools/inspection/benchmark_external_inspection.py. For each snippet it reports:
I was able to nicely reproduce #151424 with 63.35±2.19 impossible% rate, that matches that finding:
Please see Tools/inspection/oracle_external_inspection.py --help for all the flags. Not pasting it here for the brevity.
Please see Tools/inspection/oracle_external_inspection.py for a run with all the snippets.
The first two columns are relatively obvious to read. Important bits:
In short, the idea behind tvd_* is to measure the drift (bias? noise?) against the reference.
I tried to familiarize myself with the state of the literature what is the best measure of bias, drift etc. in case of statistical samplers. Maybe it's me but I couldn't find any undisputed gold standard here. I'm more than open to any other measure, and it's very likely that we'll find something better.
The PR is big but most of it is copying the snippets to a separate file. The length of the script is on par with the existing benchmarking script.
Closes #153804