run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
33.11k stars 4.61k forks source link

[Bug]: poetry version incompatibility between llama-index and core #14410

Open yisding opened 2 days ago

yisding commented 2 days ago

Bug Description

(poetry-test-py3.12) ➜  poetry-test poetry lock
Updating dependencies
Resolving dependencies... (0.6s)

Because llama-index (0.10.50) depends on llama-index-core (0.10.50)
 and no versions of llama-index match >0.10.50,<0.11.0, llama-index (>=0.10.50,<0.11.0) requires llama-index-core (0.10.50).
So, because poetry-test depends on both llama-index (^0.10.50) and llama-index-core (^0.10.50.post1), version solving failed.
(poetry-test-py3.12) ➜  poetry-test

Version

0.10.50.post1

Steps to Reproduce

Use this pyproject.toml (generated using poetry init)

(poetry-test-py3.12) ➜  poetry-test cat pyproject.toml
[tool.poetry]
name = "poetry-test"
version = "0.1.0"
description = ""
authors = ["Yi"]
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.12"
llama-index = "^0.10.50"
llama-index-core = "^0.10.50.post1"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

Relevant Logs/Tracbacks

No response

dosubot[bot] commented 2 days ago

To resolve the version incompatibility issue between llama-index and llama-index-core when running poetry lock, you need to ensure that the dependencies specified in both pyproject.toml files are compatible with each other. Here is a step-by-step approach:

  1. Check the llama-index dependencies: Ensure that the dependencies in llama-index do not conflict with those in llama-index-core.

  2. Align the versions: Make sure that the versions of shared dependencies are aligned between llama-index and llama-index-core.

  3. Update pyproject.toml: Modify the pyproject.toml file of llama-index to match the versions specified in llama-index-core.

Here is an example of how you might update the pyproject.toml file for llama-index:

[tool.poetry.dependencies]
SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}
dataclasses-json = "*"
deprecated = ">=1.2.9.3"
fsspec = ">=2023.5.0"
httpx = "*"
nest-asyncio = "^1.5.8"
nltk = "^3.8.1"
numpy = "<2.0.0"  # Pin until we adapt to Numpy v2
openai = ">=1.1.0"
pandas = "*"
python = ">=3.8.1,<4.0"
tenacity = ">=8.2.0,!=8.4.0,<9.0.0"  # Avoid 8.4.0 which lacks tenacity.asyncio
tiktoken = ">=0.3.3"
typing-extensions = ">=4.5.0"
typing-inspect = ">=0.8.0"
requests = ">=2.31.0"  # Pin to avoid CVE-2023-32681 in requests 2.3 to 2.30
aiohttp = "^3.8.6"
networkx = ">=3.0"
dirtyjson = "^1.0.8"
tqdm = "^4.66.1"
pillow = ">=9.0.0"
PyYAML = ">=6.0.1"
llama-cloud = "^0.0.6"
wrapt = "*"
llama-index-core = "^0.10.0"  # Ensure this matches the version in llama-index-core

By ensuring that the dependencies and their versions are consistent across both llama-index and llama-index-core, you should be able to resolve the version incompatibility issue when running poetry lock [1][2].

To continue talking to Dosu, mention @dosu.

yisding commented 2 days ago

Obviously if I remove llama-index-core from pyproject.toml poetry will be happy, but it'll refuse to install the latest bugfix release of core.

logan-markewich commented 2 days ago

yea, llama-index is tied to specific releases of core to help with upgrades and downgrades at the llama-index level. The tradeoff here is what you've run into.

There will be a new release probably tomorrow, and then you'll get the latest version :)