Code Monkey home page Code Monkey logo

Comments (6)

anderskm avatar anderskm commented on September 7, 2024 1

@janroden I've pushed a new commit with the above fix.

from gputil.

JaeDukSeo avatar JaeDukSeo commented on September 7, 2024 1

I still get this error, should I uninstall and reinstall? BTW love your work

from gputil.

hanhu avatar hanhu commented on September 7, 2024 1

@anderskm I don't see the fix in the pip installed version.

from gputil.

janroden avatar janroden commented on September 7, 2024

ah, seems to be a Python 2 vs 3 issue:

https://stackoverflow.com/questions/4987327/how-do-i-check-if-a-string-is-unicode-or-ascii

from gputil.

anderskm avatar anderskm commented on September 7, 2024

@janroden Thank you for pointing out the issue.
Before uploading, I always run the demo script in both a python 2 and python 3 environment, but I have not encountered the error before.
You can try a quick fix by replacing

[...]

elif (isinstance(attr,unicode)):

with

import sys

[...]

elif (sys.version_info[0] == 2):
    if (isinstance(attr,unicode)):

Note, that there are two checks for unicode in the code.

I suspect, that you might get a new "unhandled object type" error, after fixing this one.
If a new error arises, could you also post your raw output from calling nvidia-smi using the following commend?

nvidia-smi --query-gpu=index,uuid,utilization.gpu,memory.total,memory.used,memory.free,driver_version,name,gpu_serial,display_active,display_mode --format=csv,noheader,nounits

It's the same command, which GPUtil uses to get the GPU information.

from gputil.

anderskm avatar anderskm commented on September 7, 2024

@JaeDukSeo and @hanhu I'm sorry, I've been a bit slow to push the latest fixes to pip.
I have just tagged the latest commit for release and uploaded it to pip.
The newest version is now v1.4.0
You can update your current version using:

pip uninstall GPUtil
pip install GPUtil

I hope this fixes your issues. Otherwise, please let me know.
I will close this issue now. If the problem still remains, feel free to comment on this issue, and I will reopen it.

from gputil.

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.