Skip to content

TST/CLN: fix warning "gpu available but not used" #799

Description

@NickleDave

When I run tests on a machine with a GPU I get a warning from lightning that we're not using gpu even though it's detected

tests/test_eval/test_frame_classification.py: 5 warnings
tests/test_eval/test_parametric_umap.py: 1 warning
tests/test_learncurve/test_frame_classification.py: 8 warnings
tests/test_predict/test_frame_classification.py: 2 warnings
tests/test_train/test_frame_classification.py: 4 warnings
tests/test_train/test_parametric_umap.py: 1 warning
  /home/ildefonso/Documents/repos/vocalpy/vak-vocalpy/.venv/lib/python3.10/site-packages/lightning/pytorch/trainer/setup.py:187: GPU available but not used. You can set it by doing `Trainer(accelerator='gpu')`.
  • figure out if this is because of how we configure things in tests or because of how the code actually runs
  • if the latter, can we do something to squelch this warning? e.g. directly specify acclerator='cpu' so that it's clear our intent is not to use GP

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions