Closed mp68 closed 3 months ago
Is there a line with %capture
above the pip install
? If so, you should remove that. It's possible there is an error with the install.
Alternatively, I'd restart the notebook and re-run. If you don't restart after installing, that LLAMA_CPP parameter won't be refreshed.
Thank you for your quick reply! I've removed the %%capture to make the field look like this:
!pip install txtai
!pip install nltk
!pip install 'git+https://github.com/neuml/txtai#egg=txtai[pipeline]' autoawq
# Get test data
!wget -N https://github.com/neuml/txtai/releases/download/v6.2.0/tests.tar.gz
!tar -xvzf tests.tar.gz
# Install NLTK
import nltk
nltk.download('punkt')
Result is:
Requirement already satisfied: txtai in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (7.3.0)
Requirement already satisfied: faiss-cpu>=1.7.1.post2 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (1.8.0.post1)
Requirement already satisfied: torch>=1.12.1 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (2.4.0)
Requirement already satisfied: transformers>=4.28.0 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (4.43.2)
Requirement already satisfied: huggingface-hub>=0.9.0 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (0.24.2)
Requirement already satisfied: numpy>=1.18.4 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (1.26.4)
Requirement already satisfied: pyyaml>=5.3 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (6.0.1)
Requirement already satisfied: regex>=2022.8.17 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from txtai) (2024.7.24)
Requirement already satisfied: packaging in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from faiss-cpu>=1.7.1.post2->txtai) (24.1)
Requirement already satisfied: filelock in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from huggingface-hub>=0.9.0->txtai) (3.15.4)
Requirement already satisfied: fsspec>=2023.5.0 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from huggingface-hub>=0.9.0->txtai) (2024.6.1)
Requirement already satisfied: requests in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from huggingface-hub>=0.9.0->txtai) (2.32.3)
Requirement already satisfied: tqdm>=4.42.1 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from huggingface-hub>=0.9.0->txtai) (4.66.4)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from huggingface-hub>=0.9.0->txtai) (4.12.2)
Requirement already satisfied: sympy in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from torch>=1.12.1->txtai) (1.13.1)
Requirement already satisfied: networkx in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from torch>=1.12.1->txtai) (3.3)
Requirement already satisfied: jinja2 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from torch>=1.12.1->txtai) (3.1.4)
Requirement already satisfied: tokenizers<0.20,>=0.19 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from transformers>=4.28.0->txtai) (0.19.1)
Requirement already satisfied: safetensors>=0.4.1 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from transformers>=4.28.0->txtai) (0.4.3)
Requirement already satisfied: MarkupSafe>=2.0 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from jinja2->torch>=1.12.1->txtai) (2.1.5)
Requirement already satisfied: charset-normalizer<4,>=2 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from requests->huggingface-hub>=0.9.0->txtai) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from requests->huggingface-hub>=0.9.0->txtai) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from requests->huggingface-hub>=0.9.0->txtai) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from requests->huggingface-hub>=0.9.0->txtai) (2024.7.4)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from sympy->torch>=1.12.1->txtai) (1.3.0)
Requirement already satisfied: nltk in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (3.8.1)
Requirement already satisfied: click in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from nltk) (8.1.7)
Requirement already satisfied: joblib in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from nltk) (1.4.2)
Requirement already satisfied: regex>=2021.8.3 in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from nltk) (2024.7.24)
Requirement already satisfied: tqdm in /Users/username/anaconda3/envs/bzkf-txtai/lib/python3.11/site-packages (from nltk) (4.66.4)
DEPRECATION: git+https://github.com/neuml/txtai#egg=txtai[pipeline] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
Collecting txtai (from txtai[pipeline])
Cloning https://github.com/neuml/txtai to /private/var/folders/_f/w__hg2kn5wb5vzsr4m_c3h0m0000gn/T/pip-install-4o41dall/txtai_9347596623da4c84a1eb9e3b790938bf
Running command git clone --filter=blob:none --quiet https://github.com/neuml/txtai /private/var/folders/_f/w__hg2kn5wb5vzsr4m_c3h0m0000gn/T/pip-install-4o41dall/txtai_9347596623da4c84a1eb9e3b790938bf
Resolved https://github.com/neuml/txtai to commit e32f61f8b915a46ad52b889421669c2120ed5004
Installing build dependencies ... Getting requirements to build wheel ... Preparing metadata (pyproject.toml) ... ERROR: Could not find a version that satisfies the requirement autoawq (from versions: none)
ERROR: No matching distribution found for autoawq
zsh:1: command not found: wget
x txtai/
x txtai/spreadsheet.xlsx
x txtai/document.pdf
x txtai/document.docx
x txtai/stars.jpg
x txtai/night.jpg
x txtai/motorcycle.jpg
x txtai/map.jpg
x txtai/fall.jpg
x txtai/computer.jpg
x txtai/clock.jpg
x txtai/chop.jpg
x txtai/buildings.jpg
x txtai/Beijing_mobilises.wav
x txtai/Canadas_last_fully.wav
x txtai/Maine_man_wins_1_mil.wav
x txtai/Make_huge_profits.wav
x txtai/The_National_Park.wav
x txtai/US_tops_5_million.wav
x txtai/article.pdf
x txtai/books.jpg
x txtai/tabular.csv
[nltk_data] Downloading package punkt to
[nltk_data] /Users/username/nltk_data...
[nltk_data] Package punkt is already up-to-date!
autoawq is not expected to run on MacOS, the test data is downloaded manually and already in the folder (as we can see from the results).
I also tried to restart the kernel and create a new environment but it does not appear to be detected. The pip list
output is:
Package Version
----------------------------- --------------
absl-py 2.1.0
accelerate 0.33.0
aext-assistant 4.0.15
aext-assistant-server 4.0.15
aext-core 4.0.15
aext-core-server 4.0.15
aext-panels 4.0.15
aext-panels-server 4.0.15
aext-share-notebook 4.0.15
aext-share-notebook-server 4.0.15
aext-shared 4.0.15
aiobotocore 2.5.0
aiofiles 22.1.0
aiohttp 3.8.5
aioitertools 0.7.1
aiosignal 1.2.0
aiosqlite 0.18.0
alabaster 0.7.12
anaconda-anon-usage 0.4.2
anaconda-catalogs 0.2.0
anaconda-client 1.12.1
anaconda-cloud-auth 0.5.0
anaconda-navigator 2.6.1
anaconda-project 0.11.1
annotated-types 0.7.0
anyascii 0.3.2
anyio 4.4.0
appdirs 1.4.4
applaunchservices 0.3.0
appnope 0.1.2
appscript 1.1.2
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
astroid 2.14.2
astropy 5.1
asttokens 2.4.1
astunparse 1.6.3
async-lru 2.0.4
async-timeout 4.0.2
atomicwrites 1.4.0
attrs 23.2.0
Automat 20.2.0
autopep8 1.6.0
Babel 2.15.0
backcall 0.2.0
backports.functools-lru-cache 1.6.4
backports.tempfile 1.0
backports.weakref 1.0.post1
bcrypt 3.2.0
beautifulsoup4 4.12.3
binaryornot 0.4.4
bitsandbytes 0.42.0
black 0.0
bleach 6.1.0
bokeh 3.2.1
boltons 23.0.0
botocore 1.29.76
Bottleneck 1.3.5
brotlipy 0.7.0
certifi 2024.7.4
cffi 1.16.0
chardet 4.0.0
charset-normalizer 3.3.2
click 8.1.7
cloudpickle 2.2.1
clyent 1.2.2
colorama 0.4.6
colorcet 3.0.1
coloredlogs 15.0.1
colour-science 0.4.4
comm 0.2.2
conda 23.7.4
conda-build 3.26.1
conda-content-trust 0.2.0
conda_index 0.3.0
conda-libmamba-solver 23.7.0
conda-pack 0.6.0
conda-package-handling 2.2.0
conda_package_streaming 0.9.0
conda-repo-cli 1.0.75
conda-token 0.4.0
conda-verify 3.4.2
constantly 15.1.0
contourpy 1.2.1
cookiecutter 1.7.3
cryptography 42.0.8
cssselect 1.1.0
cycler 0.12.1
cytoolz 0.12.0
dask 2023.6.0
datasets 2.12.0
datashader 0.15.2
datashape 0.5.4
debugpy 1.8.2
decorator 5.1.1
defusedxml 0.7.1
diff-match-patch 20200713
dill 0.3.6
diskcache 5.6.3
distributed 2023.6.0
distro 1.9.0
docstring-to-markdown 0.11
docutils 0.18.1
entrypoints 0.4
et-xmlfile 1.1.0
executing 2.0.1
faiss-cpu 1.8.0.post1
fastjsonschema 2.20.0
fasttext 0.9.3
filelock 3.9.0
fire 0.6.0
flake8 6.0.0
Flask 2.2.2
flatbuffers 24.3.25
flwr 1.9.0
fonttools 4.53.1
fqdn 1.5.1
frozenlist 1.3.3
fsspec 2024.6.1
future 0.18.3
gast 0.6.0
gensim 4.3.0
glob2 0.7
gmpy2 2.1.2
google-pasta 0.2.0
greenlet 2.0.1
grpcio 1.64.1
h11 0.14.0
h5py 3.11.0
HeapDict 1.0.1
holoviews 1.17.1
httpcore 1.0.5
httpx 0.27.0
huggingface-hub 0.24.2
humanfriendly 10.0
hvplot 0.8.4
hyperlink 21.0.0
idna 3.7
imagecodecs 2023.1.23
ImageHash 4.3.1
imageio 2.31.1
imagesize 1.4.1
imbalanced-learn 0.10.1
importlib_metadata 8.2.0
incremental 21.3.0
inflect 7.3.1
inflection 0.5.1
iniconfig 1.1.1
intake 0.6.8
intervaltree 3.1.0
ipykernel 6.29.5
ipython 8.26.0
ipython-genutils 0.2.0
ipywidgets 8.1.3
isoduration 20.11.0
isort 5.9.3
itemadapter 0.3.0
itemloaders 1.0.4
iterators 0.0.2
itsdangerous 2.0.1
jaraco.classes 3.2.1
jedi 0.19.1
jellyfish 1.0.1
Jinja2 3.1.4
jinja2-time 0.2.0
jmespath 0.10.0
joblib 1.4.2
json5 0.9.25
jsonpatch 1.32
jsonpointer 3.0.0
jsonschema 4.22.0
jsonschema-specifications 2023.12.1
jupyter 1.0.0
jupyter_client 8.6.2
jupyter-console 6.6.3
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.14.1
jupyter_server_fileid 0.9.0
jupyter_server_terminals 0.5.3
jupyter_server_ydoc 0.8.0
jupyter-ydoc 0.2.4
jupyterlab 4.2.3
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.2
jupyterlab_widgets 3.0.11
kaleido 0.2.1
keras 3.4.1
keyring 23.13.1
kiwisolver 1.4.5
lazy_loader 0.2
lazy-object-proxy 1.6.0
libarchive-c 2.9
libclang 18.1.1
libmambapy 1.5.1
linkify-it-py 2.0.0
litellm 1.42.0
llama_cpp_python 0.2.83
llvmlite 0.40.0
lmdb 1.4.1
locket 1.0.0
lxml 4.9.3
lz4 4.3.2
Markdown 3.6
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.9.1
matplotlib-inline 0.1.7
mccabe 0.7.0
mdit-py-plugins 0.3.0
mdurl 0.1.2
mistune 3.0.2
ml-dtypes 0.3.2
more-itertools 8.12.0
mpmath 1.3.0
msgpack 1.0.3
multidict 6.0.2
multipledispatch 0.6.0
multiprocess 0.70.14
munkres 1.1.4
mypy-extensions 1.0.0
namex 0.0.8
navigator-updater 0.4.0
nbclassic 0.5.5
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
nest-asyncio 1.6.0
networkx 3.1
nltk 3.8.1
notebook 7.2.1
notebook_shim 0.2.4
numba 0.57.1
numexpr 2.8.4
numpy 1.26.4
numpydoc 1.5.0
onnx 1.16.1
onnxconverter-common 1.14.0
onnxmltools 1.12.0
onnxruntime 1.18.1
openai 1.37.0
openpyxl 3.0.10
opt-einsum 3.3.0
optree 0.12.1
overrides 7.7.0
packaging 24.1
pandas 2.2.2
pandocfilters 1.5.1
panel 1.2.3
param 1.13.0
parsel 1.6.0
parso 0.8.4
partd 1.4.0
pathlib 1.0.1
pathspec 0.12.1
patsy 0.5.3
peft 0.12.0
pep8 1.7.1
pexpect 4.8.0
pickleshare 0.7.5
pillow 10.4.0
pip 23.2.1
pkce 1.0.3
pkginfo 1.9.6
platformdirs 4.2.2
plotly 5.9.0
pluggy 1.0.0
ply 3.11
poyo 0.5.0
prometheus_client 0.20.0
prompt_toolkit 3.0.47
Protego 0.1.16
protobuf 3.20.2
psutil 6.0.0
ptyprocess 0.7.0
pure-eval 0.2.2
py-cpuinfo 8.0.0
pyarrow 11.0.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pybind11 2.13.1
pycodestyle 2.10.0
pycosat 0.6.4
pycparser 2.22
pycryptodome 3.20.0
pyct 0.5.0
pycurl 7.45.2
pydantic 2.8.2
pydantic_core 2.20.1
PyDispatcher 2.0.5
pydocstyle 6.3.0
pyerfa 2.0.0
pyflakes 3.0.1
Pygments 2.18.0
PyJWT 2.4.0
pylint 2.16.2
pylint-venv 2.3.0
pyls-spyder 0.4.0
PyMuPDF 1.24.2
PyMuPDFb 1.24.1
pyobjc-core 9.0
pyobjc-framework-Cocoa 9.0
pyobjc-framework-CoreServices 9.0
pyobjc-framework-FSEvents 9.0
pyodbc 4.0.34
pyOpenSSL 23.2.0
pyparsing 3.1.2
PyQt5 5.15.10
PyQt5-sip 12.13.0
PyQtWebEngine 5.15.6
pyrsistent 0.18.0
PySocks 1.7.1
pytest 7.4.0
python-dateutil 2.9.0.post0
python-dotenv 0.21.0
python-json-logger 2.0.7
python-lsp-black 1.2.1
python-lsp-jsonrpc 1.0.0
python-lsp-server 1.7.2
python-slugify 5.0.2
python-snappy 0.6.1
pytoolconfig 1.2.5
pytz 2024.1
pyviz-comms 2.3.0
PyWavelets 1.4.1
PyYAML 6.0.1
pyzmq 26.0.3
QDarkStyle 3.0.2
qstylizer 0.2.2
QtAwesome 1.2.2
qtconsole 5.5.2
QtPy 2.4.1
queuelib 1.5.0
referencing 0.35.1
regex 2024.5.15
requests 2.32.3
requests-file 1.5.1
requests-toolbelt 1.0.0
responses 0.13.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.7.1
rope 1.7.0
rpds-py 0.18.1
Rtree 1.0.1
ruamel.yaml 0.17.21
ruamel-yaml-conda 0.17.21
s3fs 2023.4.0
safetensors 0.3.2
scikit-image 0.20.0
scikit-learn 1.5.1
scipy 1.14.0
Scrapy 2.8.0
seaborn 0.12.2
semver 3.0.2
Send2Trash 1.8.3
sentencepiece 0.2.0
service-identity 18.1.0
setuptools 70.2.0
shellingham 1.5.4
simplejson 3.19.2
sip 6.7.12
six 1.16.0
skl2onnx 1.17.0
smart-open 5.2.1
sniffio 1.3.1
snowballstemmer 2.2.0
sortedcontainers 2.4.0
soundfile 0.12.1
soupsieve 2.5
Sphinx 5.0.2
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
spyder 5.4.3
spyder-kernels 2.4.4
SQLAlchemy 1.4.39
stack-data 0.6.3
statsmodels 0.14.0
sympy 1.11.1
tables 3.8.0
tabulate 0.8.10
tblib 1.7.0
tenacity 8.2.2
tensorboard 2.16.2
tensorboard-data-server 0.7.2
tensorflow 2.16.2
tensorflow-io-gcs-filesystem 0.37.1
termcolor 2.4.0
terminado 0.18.1
text-unidecode 1.3
textdistance 4.2.1
threadpoolctl 3.5.0
three-merge 0.1.1
tifffile 2023.4.12
tika 2.6.0
tiktoken 0.7.0
timm 1.0.7
tinycss2 1.3.0
tldextract 3.2.0
tokenizers 0.13.2
toml 0.10.2
tomli 2.0.1
tomlkit 0.11.1
toolz 0.12.0
torch 2.4.0
torchvision 0.19.0
tornado 6.4.1
tqdm 4.65.0
traitlets 5.14.3
transformers 4.32.1
ttstokenizer 1.0.0
Twisted 22.10.0
txtai 7.4.0
typeguard 4.3.0
typer 0.9.4
types-python-dateutil 2.9.0.20240316
typing_extensions 4.12.2
tzdata 2024.1
uc-micro-py 1.0.1
ujson 5.4.0
Unidecode 1.2.0
uri-template 1.3.0
urllib3 2.2.2
w3lib 1.21.0
watchdog 2.1.6
wcwidth 0.2.13
webcolors 24.6.0
webencodings 0.5.1
websocket-client 1.8.0
Werkzeug 3.0.3
whatthepatch 1.0.2
wheel 0.43.0
widgetsnbextension 4.0.11
wrapt 1.16.0
wurlitzer 3.0.2
xarray 2023.6.0
xlwings 0.29.1
xxhash 2.0.2
xyzservices 2022.9.0
y-py 0.5.9
yapf 0.31.0
yarl 1.8.1
ypy-websocket 0.8.2
zict 2.2.0
zipp 3.11.0
zope.interface 5.4.0
zstandard 0.19.0
I'm not sure if the egg is supposed to be listed in there as well, but at least the install does not fail.
David thank you so much for your efforts to help! It turned out I had to reinstall llama_cpp_python with the build parameter
!CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS"
!pip install llama-cpp-python
Now the pipeline is working.
Glad to hear it, good luck!
I'm using the 52_Build_RAG_pipelines_with_txtai.ipynb example on an M2 MacBookPro on Python 3.11.9. When executing the first cell to install the requirements, it fails to install the pipeline as the command has to be put in parenthesis, e.g.:
!pip install 'git+https://github.com/neuml/txtai#egg=txtai[pipeline]'
As the Mistral-7B-OpenOrca-AWQ model is not supported on MacOS, I'm using the mistral-7b-openorca.Q4_K_M.gguf model usingllm = LLM("TheBloke/Mistral-7B-OpenOrca-GGUF/mistral-7b-openorca.Q4_K_M.gguf", verbose=True)
However this fails with this output:How can I fix this? Thank you!