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

feat: Add kfp-tensorflow notebook to confirm NVIDIA GPU access #139

Merged
merged 3 commits into from
Nov 29, 2024

Conversation

orfeas-k
Copy link
Contributor

Add kfp-tensorflow notebook in order to confirm access to a GPU. The notebook spins uses kfp SDK to create an experiment and a run that succeeds when:

  • the run's pod is scheduled on a node with an NVIDIA GPU
  • the run's code, and more specifically Tensorflow framework, has access to an NVIDIA GPU.

Closes #128

Testing

Similar to #138, in order to test the PR

  • Spin up a cluster with a GPU. For a two node microk8s node with one gpu, refer to this comment Exploration task for running UATs using GPU #130 (comment)
  • Run with the --include-gpu-tests flag e.g.
    tox -e uats-remote -- --include-gpu-tests --filter "kfp"
    
    This should run kfp cpu and gpu tests (kfp-v1, kfp-v2, kfp-tensorflow). You can also test from inside the notebook UI.

Add `kfp-tensorflow` notebook in order to confirm access to a GPU. The
notebook spins uses kfp SDK to create an experiment and a run that
succeeds when:
 * the run's pod is scheduled on a node with an NVIDIA GPU
 * the run's code, and more specifically Tensorflow framework, has
   access to an NVIDIA GPU.
Copy link
Contributor

@kimwnasptd kimwnasptd left a comment

Choose a reason for hiding this comment

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

Works as expected!

Wanted to try and force TensorFlow to go on the GPU with tf.config.set_visible_devices([], 'CPU') but I ended up getting the error:

NotFoundError: No CPU devices are available in this process

So we'll have to stick with listing visible devices, which should be fine

@orfeas-k
Copy link
Contributor Author

@kimwnasptd Updated according to comments + pushed a commit to remove the placeholder notebook.

Copy link
Contributor

@kimwnasptd kimwnasptd left a comment

Choose a reason for hiding this comment

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

Thanks, and nice attention to detail!

@orfeas-k orfeas-k merged commit 96bd591 into main Nov 29, 2024
1 check passed
@orfeas-k orfeas-k deleted the kf-6358-uats-scenario branch November 29, 2024 11:28
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.

UAT test scenario to use GPU
2 participants