mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-06-29 18:57:44 +00:00
Ensure that bulk-debug-python script is enclosed in markers
This permits extracting Python script using Unix CLI tools when `--bulk-debug-python stdout` is used. Added example of using this to nvbench_compare.md doc.
This commit is contained in:
@@ -996,6 +996,7 @@ def make_bulk_debug_row(
|
||||
|
||||
def format_bulk_debug_python(bulk_rows: list[dict[str, Any]]) -> str:
|
||||
return (
|
||||
"# NVB-BULK-BEGIN\n"
|
||||
"# Generated by nvbench-compare --bulk-debug-python.\n"
|
||||
"import numpy as np\n\n"
|
||||
f"bulk_rows = {pprint.pformat(bulk_rows, sort_dicts=False)}\n\n"
|
||||
@@ -1028,6 +1029,7 @@ def format_bulk_debug_python(bulk_rows: list[dict[str, Any]]) -> str:
|
||||
"# row = bulk_rows[0]\n"
|
||||
"# arrays = load_bulk_data(row)\n"
|
||||
"# ambiguous = [row for row in bulk_rows if row['status'] == 'AMBG']\n"
|
||||
"# NVB-BULK-END\n"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user