Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugfix] GPU properties not displayed by logger #145

Merged
merged 4 commits into from
Jul 30, 2024

Conversation

PabloAndresCQ
Copy link
Collaborator

@PabloAndresCQ PabloAndresCQ commented Jul 30, 2024

Description

Fixed the issue below. The issue has a code snippet to reproduce the error (and see what the fix did).

Related issues

Solves issue #143

Checklist

  • I have run the tests on a device with GPUs.
  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@PabloAndresCQ PabloAndresCQ marked this pull request as ready for review July 30, 2024 09:50
logger.debug("GPU-minor:", device_props["minor"])
logger.debug("========================")
logger.info("===== device info ======")
logger.info("GPU-name: " + device_props["name"].decode())
Copy link
Collaborator

Choose a reason for hiding this comment

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

Purely nitpicking: why not opt for fstrings?

E.g.

logger.info(f"GPU-name: {device_props['name'].decode()}")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I went for that in the first commit, and mypy did not know how to parse that for some reason, so I went for this other approach 🤷

@jake-arkinstall
Copy link
Collaborator

Could a test be written to verify that a call to this function doesn't produce an exception?

@PabloAndresCQ PabloAndresCQ merged commit cd16402 into main Jul 30, 2024
8 checks passed
@PabloAndresCQ PabloAndresCQ deleted the fix/gpu_props_print branch July 30, 2024 10:15
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.

2 participants