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

Improve device information in netket.tools.info #1084

Merged
merged 2 commits into from
Jan 26, 2022
Merged

Conversation

femtobit
Copy link
Collaborator

@femtobit femtobit commented Jan 25, 2022

This fixes as small display bug in netket.tools.info:

Before:

$ python3 -m netket.tools.info
[...]
# MPI4JAX
  - HAS_GPU_EXT      : <function has_cuda_support at 0x...>
[...]

After:

$ python3 -m netket.tools.info
[...]
# MPI4JAX
  - HAS_GPU_EXT      : True
[...]

Edit: Since I already had that file open: I've added some code to print nicer looking device information:

# Jax 
  - backends         : ['cpu', 'gpu']
    - cpu            : ['<0: cpu>']
    - gpu            : ['<0: Tesla V100-PCIE-32GB>', '<1: Tesla V100-PCIE-32GB>'

@femtobit femtobit added the bug Something isn't working label Jan 25, 2022
@github-actions
Copy link

Hello and thanks for your Contribution!
I will be building previews of the updated documentation at the following link:
https://netket.github.io/netket/preview/tools.info

Once the PR is closed or merged, the preview will be automatically deleted.

@femtobit femtobit changed the title Actually call mpi4jax.has_cuda_support in netket.tools.info Improve device information in netket.tools.info Jan 25, 2022
@femtobit femtobit added the enhancement New feature or request label Jan 25, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jan 25, 2022

Codecov Report

Merging #1084 (bad6155) into master (f55de83) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1084      +/-   ##
==========================================
- Coverage   82.04%   81.83%   -0.22%     
==========================================
  Files         204      204              
  Lines       12125    12127       +2     
  Branches     1812     1813       +1     
==========================================
- Hits         9948     9924      -24     
- Misses       1743     1768      +25     
- Partials      434      435       +1     
Impacted Files Coverage Δ
netket/tools/info.py 88.77% <100.00%> (-1.85%) ⬇️
netket/tools/_cpu_info.py 52.94% <0.00%> (-35.30%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f55de83...bad6155. Read the comment docs.

Copy link
Member

@PhilipVinc PhilipVinc left a comment

Choose a reason for hiding this comment

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

Lovely!

@PhilipVinc PhilipVinc merged commit 88e964d into master Jan 26, 2022
@PhilipVinc PhilipVinc deleted the tools.info branch January 26, 2022 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants