Skip to content

Closes #3970: comm_diagnostics function to return a DataFrame - #3971

Merged
ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3970_comm_diagnostics_function_to_return_a_DataFrame
Jan 22, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:masterfrom
ajpotts:3970_comm_diagnostics_function_to_return_a_DataFrame

Conversation

@ajpotts

@ajpotts ajpotts commented Jan 13, 2025

Copy link
Copy Markdown
Contributor

This PR adds a get_comm_diagnostics() function that returns a DataFrame of diagnostic statistics. It also modifies print_comm_diagnostics to print to the python interpreter in addition to the chapel logs.

Closes #3970: comm_diagnostics function to return a DataFrame

@ajpotts
ajpotts marked this pull request as ready for review January 13, 2025 21:14

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I pulled and ran this this morning, and it certainly appears to work. Next time we have a team meeting, can you explain why the test does a print? That puzzles me, but I don't see it as a reason not to approve.

@1RyanK

1RyanK commented Jan 17, 2025

Copy link
Copy Markdown
Contributor

@drculhane If I understand correctly, lines 61 and 62 of tests/comm_diagnostics_test.py are

print_comm_diagnostics_table(print_empty_columns=True)
print_comm_diagnostics_table(print_empty_columns=False)

These were not edited, so they are easy to miss.
Anyways, because of the edits to that function (specifically lines 114 - 117 of the update):

    if print_empty_columns:
        print(df.to_markdown())
    else:
        print(df[[col for col in df.columns if ak_sum(df[col]) != 0]].to_markdown())

The tests will cause prints.

@jaketrookman jaketrookman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@ajpotts
ajpotts added this pull request to the merge queue Jan 22, 2025
Merged via the queue into Bears-R-Us:master with commit 04cff11 Jan 22, 2025
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.

comm_diagnostics function to return a DataFrame

4 participants