torchtune icon indicating copy to clipboard operation
torchtune copied to clipboard

`tune run` crashes w/ ` `NotImplementedError`

Open optimass opened this issue 10 months ago • 2 comments

$ tune run full_finetune_single_device --config llama2/7B_full_low_memory checkpointer.checkpoint_dir=/tmp/Llama-2-7b-hf

...

raise NotImplementedError(f"Loading a dataset cached in a {type(self._fs).__name__} is not supported.")
NotImplementedError: Loading a dataset cached in a LocalFileSystem is not supported.

optimass avatar Apr 23 '24 21:04 optimass

looks like the default finetuning dataset is torchtune.datasets.alpaca_dataset, but I can't import it:

>>> import torchtune.datasets
>>> import torchtune.datasets.alpaca_dataset
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torchtune.datasets.alpaca_dataset'

optimass avatar Apr 23 '24 21:04 optimass

WRT your second point, alpaca_dataset is a builder function, not a module, therefore it cannot be imported the way you're doing it.

>>> import torchtune.datasets.alpaca_dataset
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torchtune.datasets.alpaca_dataset'

Instead try the following:

>>> from torchtune.datasets import alpaca_dataset
>>>

In regards to your first point, have you already download the alpaca dataset to try with something else? There might be an error with your cache being symlinked to the wrong location (happens w/ Hugging Face artifacts). You can try huggingface-cli delete-cache (https://huggingface.co/docs/huggingface_hub/en/guides/cli#huggingface-cli-delete-cache). LMK if that doesn't work!

joecummings avatar Apr 23 '24 22:04 joecummings

thanks!

I scanned my hf cache but I could only find models. I found on stack overflow that pip install -U datasets might work, and it did ! link.

optimass avatar Apr 24 '24 15:04 optimass