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

I keep getting an error that says "ModuleNotFoundError: No module named 'utils.dataset_utils'" #26

Closed
BrookMakF opened this issue Sep 15, 2023 · 2 comments

Comments

@BrookMakF
Copy link

I was trying to use utlis, following the example from llama-recipes/examples/quickstart.ipynb file. However, I keep getting a utils error when I run this Python code:

from pathlib import Path
import os
import sys
from utils.dataset_utils import get_preprocessed_dataset
from configs.datasets import samsum_dataset

train_dataset = get_preprocessed_dataset(tokenizer, samsum_dataset, 'train')

First it was saying there is No modle named 'utlis' so I did pip install utils. Now it says the below error:

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[3], line 4
      2 import os
      3 import sys
----> 4 from utils.dataset_utils import get_preprocessed_dataset
      5 from configs.datasets import samsum_dataset
      7 train_dataset = get_preprocessed_dataset(tokenizer, samsum_dataset, 'train')

ModuleNotFoundError: No module named 'utils.dataset_utils'

When I do:

!pip show utils

This is the output about my utlis version:

Name: utils
Version: 1.0.1
Summary: A grab-bag of utility functions and objects
Home-page: http://github.com/haaksmash/pyutils
Author: Haak Saxberg
Author-email: haak.erling@gmail.com
License: UNKNOWN
Location: /root/Desktop/llama2_70B/llama/env_Py310/lib/python3.10/site-packages
Requires: 
Required-by: 
@haaksmash
Copy link
Owner

@BrookMakF, great detective work getting all the way here from that initial hurdle! I'm pretty sure that the utils that llama-recipes is referring to is not this package (haaksmash/pyutils) but rather this one, a part of the llama-recipes repository: https://github.com/facebookresearch/llama-recipes/tree/main/src/llama_recipes/utils

It seems like there might have been a missing step when activating or linking your python environment? I've never interacted with llama-research, so unfortunately I can't be much further help with trouble-shooting, and this repository probably can't help unblock you 😞

@BrookMakF
Copy link
Author

@haaksmash thank you for responding, I found out this yesterday and already solved it, as I mentioned it on another Issues thread elsewhere. But your comment would have actually helped me to find the problem have I not already solved it.

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

2 participants