Skip to content

Conversation

@ajpotts
Copy link
Contributor

@ajpotts ajpotts commented Jan 13, 2025

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
Copy link
Contributor

@drculhane drculhane left a comment

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
Copy link
Contributor

1RyanK commented Jan 17, 2025

@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.

Copy link
Contributor

@jaketrookman jaketrookman left a comment

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
19 checks passed
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