From 35008cdabf1df07ab034739d2a4f5b21c7ba6c6e Mon Sep 17 00:00:00 2001 From: jorgep31415 Date: Wed, 22 Jan 2025 19:10:50 -0800 Subject: [PATCH] [ET] Include delegate debug data in tsv to follow the signature of `print_data_tabular`. Differential Revision: [D68534947](https://our.internmc.facebook.com/intern/diff/D68534947/) [ghstack-poisoned] --- devtools/inspector/_inspector.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devtools/inspector/_inspector.py b/devtools/inspector/_inspector.py index 001ea505501..989663601f8 100644 --- a/devtools/inspector/_inspector.py +++ b/devtools/inspector/_inspector.py @@ -1192,17 +1192,21 @@ def print_data_tabular( def save_data_to_tsv( self, file: IO[str], + include_units: bool = True, + include_delegate_debug_data: bool = False, ) -> None: """ Stores the underlying EventBlocks in tsv format to facilitate copy-paste into spreadsheets. Args: file: Which IO stream to print to. Do not use stdout, as tab separator is not preserved. + include_units: Whether headers should include units (default true) + include_delegate_debug_data: Whether to include delegate debug metadata (default false) Returns: None """ - df = self._prepare_dataframe() + df = self._prepare_dataframe(include_units, include_delegate_debug_data) df.to_csv(file, sep="\t") # TODO: write unit test