Skip to content

script to generate LaTeX tables from our benchmark outputs#35

Merged
lemire merged 3 commits into
masterfrom
latex_table
May 6, 2025
Merged

script to generate LaTeX tables from our benchmark outputs#35
lemire merged 3 commits into
masterfrom
latex_table

Conversation

@lemire
Copy link
Copy Markdown
Member

@lemire lemire commented Apr 24, 2025

With this script, we can turn a benchmark run into a proper LaTeX table. Of course, it is possible to manually adjust the table afterward.

We could possibly use this script to generate a couple of table per platform (using our data files).

I am including instructions (see README.md file in the scripts directory).

@lemire lemire requested review from Copilot and jaja360 and removed request for Copilot April 24, 2025 15:12
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a script to generate LaTeX tables from benchmark outputs and updates the README with instructions on its usage.

  • Added a new Python script (latex_table.py) to parse benchmark outputs and format them as a LaTeX table.
  • Updated the README with usage instructions for running the script.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scripts/latex_table.py Added a new script with functions for formatting numbers and parsing input data, but contains a typo in the main guard and debugging prints that should be removed.
scripts/README.md Added a new README file with instructions to run the LaTeX table generator.

Comment thread scripts/latex_table.py Outdated
Comment thread scripts/latex_table.py Outdated
@lemire lemire requested a review from Copilot April 24, 2025 17:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new Python script that converts benchmark outputs into LaTeX tables and updates the README with instructions to run the script.

  • Adds the script (latex_table.py) for parsing benchmark data and formatting it into a LaTeX table
  • Updates the README with detailed usage instructions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/latex_table.py New script to parse benchmark data, generate a LaTeX table, and output formatted results; includes several debugging print statements and specific numeric value handling
scripts/README.md Added instructions on running benchmarks and generating LaTeX tables from the output
Comments suppressed due to low confidence (1)

scripts/latex_table.py:9

  • Consider formatting a value of 0 as a valid numeric output instead of returning 'N/A', unless this behavior is intentional.
if not isinstance(value, (int, float)) or value == 0:

Comment thread scripts/latex_table.py Outdated
@lemire lemire requested a review from Copilot April 24, 2025 17:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a Python script for generating LaTeX tables from benchmark output data and updates the README with instructions to run the script.

  • Added scripts/latex_table.py to parse benchmark output and format it into a LaTeX table
  • Added scripts/README.md updates to guide users through generating tables

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/latex_table.py New script to convert benchmark outputs into a formatted table
scripts/README.md Documentation update guiding usage of the new script
Comments suppressed due to low confidence (1)

scripts/latex_table.py:30

  • [nitpick] The variable name 'format' shadows the built-in function 'format'. Consider renaming it, for example to 'formatted_value'.
format = f"{'-' if is_negative else ''}{abs_value*10**exponent}"

Copy link
Copy Markdown
Collaborator

@jaja360 jaja360 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the code and tested it. Everything seems perfect !

@jaja360
Copy link
Copy Markdown
Collaborator

jaja360 commented May 5, 2025

I think we can merge this ?

@lemire
Copy link
Copy Markdown
Member Author

lemire commented May 6, 2025

Let us do so !!!

Now we have to print out the actual tables and do some work! :-)

@lemire lemire merged commit 2afc341 into master May 6, 2025
8 checks passed
@jaja360 jaja360 deleted the latex_table branch May 17, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants