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

llama-3.1 finetuning examples breaks with python3.10 #658

Closed
1 of 2 tasks
goswamig opened this issue Sep 2, 2024 · 4 comments
Closed
1 of 2 tasks

llama-3.1 finetuning examples breaks with python3.10 #658

goswamig opened this issue Sep 2, 2024 · 4 comments
Assignees

Comments

@goswamig
Copy link
Contributor

goswamig commented Sep 2, 2024

System Info

(myenv) ubuntu@i~$ python --version
Python 3.10.14
(myenv) ubuntu@i~$ pip --version
pip 23.0.1 from /home/ubuntu/myenv/lib/python3.10/site-packages/pip (python 3.10)

Information

  • The official example scripts
  • My own modified scripts

🐛 Describe the bug

The official finetuning example with peft fails to run

Error logs

from llama_recipes.configs.datasets import samsum_dataset
from llama_recipes.utils.dataset_utils import get_dataloader

samsum_dataset.trust_remote_code = True

train_dataloader = get_dataloader(tokenizer, samsum_dataset, train_config)
eval_dataloader = get_dataloader(tokenizer, samsum_dataset, train_config, "val")

Errror

/home/ubuntu/myenv/lib/python3.10/site-packages/llama_recipes/model_checkpointing/checkpoint_handler.py:17: DeprecationWarning: `torch.distributed._shard.checkpoint` will be deprecated, use `torch.distributed.checkpoint` instead
  from torch.distributed._shard.checkpoint import (
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[4], line 2
      1 from llama_recipes.configs.datasets import samsum_dataset
----> 2 from llama_recipes.utils.dataset_utils import get_dataloader
      4 samsum_dataset.trust_remote_code = True
      6 train_dataloader = get_dataloader(tokenizer, samsum_dataset, train_config)

ImportError: cannot import name 'get_dataloader' from 'llama_recipes.utils.dataset_utils' (/home/ubuntu/myenv/lib/python3.10/site-packages/llama_recipes/utils/dataset_utils.py)
$ pip list | grep -i llama
llama-recipes                            0.0.3

Expected behavior

https://github.com/meta-llama/llama-recipes/blob/main/recipes/quickstart/finetuning/quickstart_peft_finetuning.ipynb example should have run fine.

@goswamig
Copy link
Contributor Author

goswamig commented Sep 2, 2024

I believe this is breaking because #650 has updated llama_recipes.utils.dataset_utils however the package is not updated https://pypi.org/project/llama-recipes/#history

@mreso
Copy link
Contributor

mreso commented Sep 3, 2024

Hi @goswamig
thank for reporting this.
You are running the notebook from the current nightly release but you have installed llama-recipes 0.03 which is not compatible anymore. You can either

  1. Update llama-recipes to the newest nightly with
pip install -U git+https://github.com/meta-llama/llama-recipes

or 2.:
Use the notebook from 0.0.3 release:
https://github.com/meta-llama/llama-recipes/blob/v0.0.3/recipes/quickstart/finetuning/quickstart_peft_finetuning.ipynb

Let me know if this does not solve the issue.

@goswamig
Copy link
Contributor Author

goswamig commented Sep 3, 2024

Can we also update the wheel package of llama-recipe with the latest change?

@mreso
Copy link
Contributor

mreso commented Sep 25, 2024

We just created a new release so this issue should be fixes.

@mreso mreso closed this as completed Sep 25, 2024
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

No branches or pull requests

3 participants