Giter Club home page Giter Club logo

Comments (6)

pieroit avatar pieroit commented on June 9, 2024

Hi @adamakhtar this kind of error:
ValueError: operands could not be broadcast together with shapes (747,) (746,)

Happens when the embeddings have different size than expected.
Can you repeat the error with a clean installation?

Another option is file based Qdrant messing up when uploading multiple documents at once. Solutions:

  • use Qdrant container (example in repo local-cat)
  • upload one document per time

Let me know ;)

from core.

AlessandroSpallina avatar AlessandroSpallina commented on June 9, 2024

EDIT: My issue was related to a bug in C.A.T. Advanced Tools plugin, issue here

I do not have time now to debug, I'll leave here a note

I have a similar issue running local-cat, I receive "'>=' not supported between instances of 'UnexpectedResponse' and 'int'".
My experience was:

  1. upload a single document and wait for uploading to complete (with the summarization plugin turned on)
  2. chat and check that everything is ok
  3. download and activate a new plugin
    at this point, I see the error.

Here some logs

cheshire_cat_core           | [2024-03-14 17:25:09.286] INFO   cat.looking_glass.stray_cat.StrayCat.recall_relevant_memories_to_working_memory::121
cheshire_cat_core           | "Recall query: 'ooo'"
cheshire_cat_vector_memory  | 2024-03-14T17:25:10.437872Z  INFO actix_web::middleware::logger: 192.168.0.4 "POST /collections/episodic/points/search HTTP/1.1" 200 68 "-" "python-httpx/0.27.0" 0.002927
cheshire_cat_vector_memory  | 2024-03-14T17:25:10.441132Z  INFO actix_web::middleware::logger: 192.168.0.4 "POST /collections/declarative/points/search HTTP/1.1" 200 69 "-" "python-httpx/0.27.0" 0.000905 
cheshire_cat_vector_memory  | 2024-03-14T17:25:10.443311Z  INFO actix_web::middleware::logger: 192.168.0.4 "POST /collections/procedural/points/search HTTP/1.1" 422 131 "-" "python-httpx/0.27.0" 0.000355 
cheshire_cat_core           | [2024-03-14 17:25:10.444] ERROR  cat.looking_glass.stray_cat.StrayCat.__call__::250
cheshire_cat_core           | UnexpectedResponse()
cheshire_cat_core           | [2024-03-14 17:25:10.467] ERROR  cat.routes.websocket..websocket_endpoint::82
cheshire_cat_core           | TypeError("'>=' not supported between instances of 'UnexpectedResponse' and 'int'")
cheshire_cat_core           | Traceback (most recent call last):
cheshire_cat_core           |   File "/app/cat/looking_glass/stray_cat.py", line 248, in __call__
cheshire_cat_core           |     self.recall_relevant_memories_to_working_memory()
cheshire_cat_core           |   File "/app/cat/looking_glass/stray_cat.py", line 170, in recall_relevant_memories_to_working_memory
cheshire_cat_core           |     memories = vector_memory.recall_memories_from_embedding(**config)
cheshire_cat_core           |   File "/app/cat/memory/vector_memory_collection.py", line 231, in recall_memories_from_embedding
cheshire_cat_core           |     memories = self.client.search(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/qdrant_client/qdrant_client.py", line 343, in search
cheshire_cat_core           |     return self._client.search(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/qdrant_client/qdrant_remote.py", line 479, in search
cheshire_cat_core           |     search_result = self.http.points_api.search_points(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api/points_api.py", line 1388, in search_points
cheshire_cat_core           |     return self._build_for_search_points(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api/points_api.py", line 636, in _build_for_search_points
cheshire_cat_core           |     return self.api_client.request(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 74, in request
cheshire_cat_core           |     return self.send(request, type_)
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/qdrant_client/http/api_client.py", line 97, in send
cheshire_cat_core           |     raise UnexpectedResponse.for_response(response)
cheshire_cat_core           | qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 422 (Unprocessable Entity)
cheshire_cat_core           | Raw response content:
cheshire_cat_core           | b'{"status":{"error":"Validation error in JSON body: [search_request.limit: value 0 invalid, must be 1.0 or larger]"},"time":0.0}'
cheshire_cat_core           |
cheshire_cat_core           | During handling of the above exception, another exception occurred:
cheshire_cat_core           |
cheshire_cat_core           | Traceback (most recent call last):
cheshire_cat_core           |   File "/app/cat/routes/websocket.py", line 73, in websocket_endpoint
cheshire_cat_core           |     await asyncio.gather(
cheshire_cat_core           |   File "/app/cat/routes/websocket.py", line 24, in receive_message
cheshire_cat_core           |     cat_message = await run_in_threadpool(stray.run, user_message)
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
cheshire_cat_core           |     return await anyio.to_thread.run_sync(func, *args)
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
cheshire_cat_core           |     return await get_asynclib().run_sync_in_worker_thread(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
cheshire_cat_core           |     return await future
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
cheshire_cat_core           |     result = context.run(func, *args)
cheshire_cat_core           |   File "/app/cat/looking_glass/stray_cat.py", line 340, in run
cheshire_cat_core           |     return self.loop.run_until_complete(
cheshire_cat_core           |   File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
cheshire_cat_core           |   File "/app/cat/looking_glass/stray_cat.py", line 251, in __call__
cheshire_cat_core           |     traceback.print_exc(e)
cheshire_cat_core           |   File "/usr/local/lib/python3.10/traceback.py", line 179, in print_exc
cheshire_cat_core           |     print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)
cheshire_cat_core           |   File "/usr/local/lib/python3.10/traceback.py", line 119, in print_exception
cheshire_cat_core           |     te = TracebackException(type(value), value, tb, limit=limit, compact=True)
cheshire_cat_core           |   File "/usr/local/lib/python3.10/site-packages/exceptiongroup/_formatting.py", line 96, in __init__
cheshire_cat_core           |     self.stack = traceback.StackSummary.extract(
cheshire_cat_core           |   File "/usr/local/lib/python3.10/traceback.py", line 357, in extract
cheshire_cat_core           |     if limit >= 0:
cheshire_cat_core           | TypeError: '>=' not supported between instances of 'UnexpectedResponse' and 'int'
cheshire_cat_core           | INFO:     connection closed

from core.

adamakhtar avatar adamakhtar commented on June 9, 2024

@pieroit thank you for the information. I've currently put on hold the project which required uisng Cheshire Cat so won't be able ot try your suggestions.

However, in case this helps anybody else, I think I did see some errors regarding embeddings and different sizes in my terminal when uploading the texts so that was likely the issue as you mentioned.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.