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

[BUG] The feat “ nano_graphrag” , i meet the mistake as follow #440

Closed
WangAo-0 opened this issue Oct 30, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@WangAo-0
Copy link

Description

i used ollama as the local llm
llm:qwen2.5
embedding : nomic-embed-text
image

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

❯ python app.py
[nltk_data] Downloading package punkt_tab to /home/oliver/.conda/envs/
[nltk_data]     kotaemon_nano_graphrag/lib/python3.10/site-
[nltk_data]     packages/llama_index/core/_static/nltk_cache...
[nltk_data]   Unzipping tokenizers/punkt_tab.zip.
GraphRAG dependencies not installed. Try `pip install graphrag future` to install. GraphRAG retriever pipeline will not work properly.
INFO:chromadb.telemetry.product.posthog:Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
Traceback (most recent call last):
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/manager.py", line 60, in build_index
    index.on_create()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/file/index.py", line 315, in on_create
    self._setup_resources()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/file/index.py", line 140, in _setup_resources
    self._vs: BaseVectorStore = get_vectorstore(f"index_{self.id}")
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/components.py", line 36, in get_vectorstore
    return deserialize(vs_conf, safe=False)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/theflow/utils/modules.py", line 168, in deserialize
    return cls(**params)
  File "/home/oliver/kotaemon_nano_graphrag/libs/kotaemon/kotaemon/storages/vectorstores/chroma.py", line 43, in __init__
    client = chromadb.PersistentClient(path=path)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/__init__.py", line 153, in PersistentClient
    return ClientCreator(tenant=tenant, database=database, settings=settings)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/client.py", line 58, in __init__
    super().__init__(settings=settings)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/shared_system_client.py", line 19, in __init__
    SharedSystemClient._create_system_if_not_exists(self._identifier, settings)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/shared_system_client.py", line 30, in _create_system_if_not_exists
    new_system.instance(ServerAPI)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/config.py", line 424, in instance
    impl = type(self)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/api/segment.py", line 125, in __init__
    self._manager = self.require(SegmentManager)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/config.py", line 317, in require
    inst = self._system.instance(type)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/config.py", line 424, in instance
    impl = type(self)
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/segment/impl/manager/local.py", line 96, in __init__
    // PersistentLocalHnswSegment.get_file_handle_count()
  File "/home/oliver/.conda/envs/kotaemon_nano_graphrag/lib/python3.10/site-packages/chromadb/segment/impl/vector/local_persistent_hnsw.py", line 527, in get_file_handle_count
    hnswlib_count = hnswlib.Index.file_handle_count
AttributeError: type object 'hnswlib.Index' has no attribute 'file_handle_count'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/oliver/kotaemon_nano_graphrag/app.py", line 15, in <module>
    app = App()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/app.py", line 73, in __init__
    self.initialize_indices()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/app.py", line 84, in initialize_indices
    self.index_manager.on_application_startup()
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/manager.py", line 188, in on_application_startup
    self.build_index(**index)
  File "/home/oliver/kotaemon_nano_graphrag/libs/ktem/ktem/index/manager.py", line 68, in build_index
    raise ValueError(f'Cannot create index "{name}": {e}')
ValueError: Cannot create index "File": type object 'hnswlib.Index' has no attribute 'file_handle_count'

Browsers

No response

OS

No response

Additional information

No response

@WangAo-0 WangAo-0 added the bug Something isn't working label Oct 30, 2024
@WangAo-0
Copy link
Author

WangAo-0 commented Oct 30, 2024

pip uninstall hnswlib
pip uninstall chroma-hnswlib
pip install chroma-hnswlib

it worked after i reinstalled chroma-hnswlib, references

@taprosoft
Copy link
Collaborator

Thanks for the quick feedback we will note it on the README.

@WangAo-0
Copy link
Author

WangAo-0 commented Oct 30, 2024

Thanks for the quick feedback we will note it on the README.

Btw,the process of creating the nano_graphrag index is so slow that I sometimes wonder if it is stuck. I hope there will be a progress bar to tell the user how the creation is progressing.

@taprosoft
Copy link
Collaborator

Currently progress is displayed only on the server-side log. Will make a more seamless progress reporting later.

@WangAo-0
Copy link
Author

The problem has been solved temporarily, but it still needs functional verification. However, it takes too long to create the index, and the prompts to users are not very clear. Even the server-side console is the same. I don’t know when it will be available. When the creation is not completed, the option of available index will appear when the front-end page is refreshed (it is not actually created yet), and an error will be reported again. However, this is a very good feature, and I hope it can be improved as soon as possible. Thanks for integrating this project.

akri2021 added a commit to akri2021/chroma that referenced this issue Nov 1, 2024
There seems to be a trivial bug with a wrong comment sign from another programming language. 
I stumbled upon it when testing nano-graphrag with Kotaemon (https://github.com/Cinnamon/kotaemon)
Other mentions of this bug:
Cinnamon/kotaemon#440
chroma-core#931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants