Giter Site home page Giter Site logo

Comments (9)

johntmyers avatar johntmyers commented on May 30, 2024

If you import TF yourself whats your output from:

physical_devices = tf.config.list_physical_devices('GPU')
print("Num GPUs:", len(physical_devices))

and also

tf.test.gpu_device_name()

from gretel-synthetics.

tmontana avatar tmontana commented on May 30, 2024

Here is the output:

physical_devices = tf.config.list_physical_devices('GPU')
print("Num GPUs:", len(physical_devices))

Num GPUs: 1

tf.test.gpu_device_name()

'/device:GPU:0'

If you import TF yourself whats your output from:

physical_devices = tf.config.list_physical_devices('GPU')
print("Num GPUs:", len(physical_devices))

Num GPUs: 1

and also

tf.test.gpu_device_name()

'/device:GPU:0'

thanks

from gretel-synthetics.

johntmyers avatar johntmyers commented on May 30, 2024

Thanks, did you run this in the example notebook that you were trying to run or somewhere else?

Also, that warning doesn't change anything under the hood, it just prints the warning in the event the tf.test.gpu_device_name() does not return the expected value. The model should still start to train regardless. If you let the model train, how long does each epoch take to run?

from gretel-synthetics.

tmontana avatar tmontana commented on May 30, 2024

Thanks, did you run this in the example notebook that you were trying to run or somewhere else?

Also, that warning doesn't change anything under the hood, it just prints the warning in the event the tf.test.gpu_device_name() does not return the expected value. The model should still start to train regardless. If you let the model train, how long does each epoch take to run?

Ok my bad - for some reason the problem is linked to my conda environment. I had run your commands in the Python3 environment. If I run them in the Gretel environment (created as above) I get 'Num GPUs: 0'.

Would you know why TF is not seeing the GPU?

Thanks

from gretel-synthetics.

johntmyers avatar johntmyers commented on May 30, 2024

I'm not sure, I've personally only used a virtualenv to run things. @zredlined have you run into this with conda or had to do any other steps to allow the GPU to be accessed in an environment like that?

from gretel-synthetics.

zredlined avatar zredlined commented on May 30, 2024

Tensorflow versions are coded to different CUDA library versions. Conda's pretty good at handling this- so we usually recommend setting up tensorflow through Conda.

Here's a link to the pinned TF->CUDA versions.

Try installing dependencies with Conda.

conda install tensorflow=2.3 cudatoolkit=10.1
pip install gretel-synthetics

from gretel-synthetics.

tmontana avatar tmontana commented on May 30, 2024

still doesn't work. Anyway it's a tensorflow issue apparently (and not Gretel) as the GPU is not recognized after I install just tensorflow. I'll investigate it further. Thank you

from gretel-synthetics.

zredlined avatar zredlined commented on May 30, 2024

Looks like there might be some dependency mismatches in the latest Conda scripts. Here are instructions for building a tensorflow==2.4 virtual environment with Conda, gretel-synthetics, and GPU. I tested on AWS running a debian image. Hope this helps!

First, setup your Conda environment
conda create --name tf --python=3.8
conda activate tf

Copy this Gist using the TensorFlow team's latest instructions into a shell script named setup_deps.sh: https://gist.github.com/zredlined/dc7a0cb5ca72d58a8cc29ce6eee441cf

Next, run the setup script
sh setup_deps.sh

from gretel-synthetics.

tmontana avatar tmontana commented on May 30, 2024

sh setup_deps.sh

thanks @zredlined - that worked. I've been on it for the past 3 hours and was going to give up. I tested on AzureML and working fine. Cheers

from gretel-synthetics.

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.