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

Fix test_finetuning for env without cuda #327

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

mreso
Copy link
Contributor

@mreso mreso commented Dec 13, 2023

What does this PR do?

This PR fixed test_finetuning.py for cpu only envs

Feature/Issue validation/testing

  • Test A
$ nvidia-smi
NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
$ python -m pytest tests/
============================================================================================================ test session starts =============================================================================================================
platform linux -- Python 3.10.13, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/ubuntu/llama-recipes
configfile: pyproject.toml
plugins: mock-3.12.0
collected 22 items

tests/test_batching.py ss                                                                                                                                                                                                              [  9%]
tests/test_finetuning.py .....                                                                                                                                                                                                         [ 31%]
tests/test_sampler.py ..........                                                                                                                                                                                                       [ 77%]
tests/test_train_utils.py .                                                                                                                                                                                                            [ 81%]
tests/datasets/test_custom_dataset.py s.                                                                                                                                                                                               [ 90%]
tests/datasets/test_grammar_datasets.py s                                                                                                                                                                                              [ 95%]
tests/datasets/test_samsum_datasets.py s                                                                                                                                                                                               [100%]

============================================================================================================== warnings summary ==============================================================================================================
tests/conftest.py:45
  /home/ubuntu/llama-recipes/tests/conftest.py:45: PytestRemovedIn8Warning: The pytest_cmdline_preparse hook is deprecated and will be removed in a future release.
  Please use pytest_load_initial_conftests hook instead.
    @pytest.hookimpl(tryfirst=True)

src/llama_recipes/finetuning.py:5
  /home/ubuntu/llama-recipes/src/llama_recipes/finetuning.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import packaging

../miniconda3/envs/llama-recipes/lib/python3.10/site-packages/torch/cuda/__init__.py:611
  /home/ubuntu/miniconda3/envs/llama-recipes/lib/python3.10/site-packages/torch/cuda/__init__.py:611: UserWarning: Can't initialize NVML
    warnings.warn("Can't initialize NVML")

../miniconda3/envs/llama-recipes/lib/python3.10/site-packages/torch/distributed/_shard/checkpoint/__init__.py:8
  /home/ubuntu/miniconda3/envs/llama-recipes/lib/python3.10/site-packages/torch/distributed/_shard/checkpoint/__init__.py:8: DeprecationWarning: torch.distributed._shard.checkpoint will be deprecated, use torch.distributed.checkpoint instead
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
================================================================================================= 17 passed, 5 skipped, 4 warnings in 1.63s ==================================================================================================

Before submitting

Thanks for contributing 🎉!

@chauhang chauhang merged commit 1896fd8 into main Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants