lance has no module 'dataset' #2050
Replies: 7 comments 1 reply
-
Hi @Aryan-Deshpande, Can you try uninstalling lance and installing it like this? $ pip install --upgrade pyarrow
$ pip install --upgrade pylance The correct name for Lance for pip install is "pylance". Please let us know if it works. Cheers! |
Beta Was this translation helpful? Give feedback.
-
Hey @tanaymeh , The issue still persists |
Beta Was this translation helpful? Give feedback.
-
you may have to uninstall the pypi package named |
Beta Was this translation helpful? Give feedback.
-
@Aryan-Deshpande It works fine when I run it in a fresh Google Colab session. Can you try deleting the colab runtime and starting afresh? Thanks! |
Beta Was this translation helpful? Give feedback.
-
It says dataset was not found at the location content/codeparrot_1M.lance |
Beta Was this translation helpful? Give feedback.
-
@Aryan-Deshpande It runs fine for me when I download the dataset following the instructions on the Kaggle Datasets page for the Codeparrot 1M dataset with changes for Google Colab since it downloads everything at You need to make the necessary changes in the path depending on what platform you are using (for example: Here's the bash script that worked fine for me: pip install -q kaggle pyarrow pylance
mkdir ~/.kaggle/
mv /content/kaggle.json ~/.kaggle/kaggle.json # move kaggle.json API key to ~/.kaggle/ from /content
kaggle datasets download -d heyytanay/codeparrot-1m
mkdir /content/codeparrot_1M.lance/
unzip -qq /content/codeparrot-1m.zip -d /content/codeparrot_1M.lance/
rm /content/codeparrot-1m.zip |
Beta Was this translation helpful? Give feedback.
-
Converting this to a discussion since it's not an issue with Lance. |
Beta Was this translation helpful? Give feedback.
-
Error Description:
Collecting lance
Downloading lance-1.2.1-py3-none-any.whl (22 kB)
Installing collected packages: lance
Successfully installed lance-1.2.1
AttributeError Traceback (most recent call last)
in <cell line: 3>()
1 get_ipython().system('pip install lance')
2 import lance
----> 3 dataset = lance.dataset('codeparrot_1M.lance/')
4 print(dataset.count_rows())
AttributeError: module 'lance' has no attribute 'dataset'
(colab)
Code:
!pip install lance
import lance
dataset = lance.dataset('codeparrot_1M.lance/')
print(dataset.count_rows())
Beta Was this translation helpful? Give feedback.
All reactions