Coder Social home page Coder Social logo

JSON output about gpustat HOT 13 CLOSED

wookayin avatar wookayin commented on May 20, 2024
JSON output

from gpustat.

Comments (13)

Stonesjtu avatar Stonesjtu commented on May 20, 2024 1

I'd like to recommend an NVML binding for Python to collect GPU information rather than nvidia-smi. This library would significantly simplify the code base for information gathering.

https://github.com/jonsafari/nvidia-ml-py

from gpustat.

wookayin avatar wookayin commented on May 20, 2024 1

@cceyda driver version has been added into the JSON output.

However, cuda version isn't something gpustat cannot retrieve from querying nvidia driver. The cuda runtime may vary by applications and dynamic libraries being loaded. Please refer to https://stackoverflow.com/questions/9727688/how-to-get-the-cuda-version for how to get the cuda version.

from gpustat.

wookayin avatar wookayin commented on May 20, 2024

Partly included in v0.3.0

from gpustat.

Stonesjtu avatar Stonesjtu commented on May 20, 2024

When the json output is stable, maybe we can detach the data collecting module and display module. Then we can request GPU usages from different remote data collecting nodes via HTTP or something else.

from gpustat.

wookayin avatar wookayin commented on May 20, 2024

Exactly, I am hoping to decouple them so that we can collect and display GPU usages from different machines. Working on these, so stay tuned :-)

from gpustat.

rubenvereecken avatar rubenvereecken commented on May 20, 2024

Any news on this? Wouldn't mind giving a helping hand.

from gpustat.

wookayin avatar wookayin commented on May 20, 2024

@Stonesjtu Quite agree with you. It provides more information, and we could turn gpustat into a human-friendly wrapper with cleaner abstraction, providing monitoring functionalities as well. For JSON output formats, I plan to make it fully compatible with a XML format from nvidia-smi -q -x.

from gpustat.

Stonesjtu avatar Stonesjtu commented on May 20, 2024

I'm trying to move the nvidia-smi API to nvidia-ml-py

Update: you may like to review my PR #17

from gpustat.

gyscos avatar gyscos commented on May 20, 2024

JSON output is a great feature!

A few notes on the current implementation:

  • Fields with a dot (like utilization.gpu) make them harder to use in many JSON clients (like jq).
  • Numeric fields could use numeric values instead of strings

from gpustat.

Stonesjtu avatar Stonesjtu commented on May 20, 2024

@gyscos I think fileds with dot can be naturally organized into sub-dict. e.g.

{
'utilization': 
  {
  'gpu': 40,
  'memory': 30,
  }
}

from gpustat.

wookayin avatar wookayin commented on May 20, 2024

I plan to make a few of breaking changes towards 1.0, such as units and use of numerical values.

from gpustat.

cceyda avatar cceyda commented on May 20, 2024

would it be possible to get driver_version and cuda_version (if available) in the json output?

from gpustat.

wookayin avatar wookayin commented on May 20, 2024

There won't be breaking changes in the units (e.g. MB vs bytes) but later we will add a flag/option to specify the units or to customize the JSON schema.

from gpustat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.