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

feat: add RAG recipe to the catalog #1142

Merged
merged 1 commit into from
Jun 21, 2024
Merged

Conversation

jeffmaury
Copy link
Contributor

Fixes #474

What does this PR do?

Add the RAG recipe to the catalog

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

#474

How to test this PR?

Launch the RAG recipe

@jeffmaury jeffmaury requested review from benoitf and a team as code owners May 31, 2024 16:44
@jeffmaury jeffmaury requested a review from axel7083 May 31, 2024 16:44
Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test so just a question. Does it work without changing any code from our end? I remember it needed chromadb-server

@jeffmaury
Copy link
Contributor Author

I didn't test so just a question. Does it work without changing any code from our end? I remember it needed chromadb-server

Yes the chromadb-server is part of the recipe.

@lstocchi
Copy link
Contributor

lstocchi commented Jun 3, 2024

I didn't test so just a question. Does it work without changing any code from our end? I remember it needed chromadb-server

Yes the chromadb-server is part of the recipe.

In the readme they say that we have to set the env variable VECTORDB_HOST but this is not something that we do, no? 🤔

podman run --rm -it -p 8501:8501 \
-e MODEL_ENDPOINT=http://10.88.0.1:8001 \
-e VECTORDB_HOST=10.88.0.1 \
-v Local/path/to/locallm/models/:/rag/models \
rag   

@lstocchi
Copy link
Contributor

lstocchi commented Jun 3, 2024

In the readme they say that we have to set the env variable VECTORDB_HOST but this is not something that we do, no? 🤔

Ah ok, it works bc by default it calls to port 8000, but the chroma db is empty. Shouldn't we offer to the user a way to add a document to fill the chroma_db, otherwise it's not really useful to use a rag.

Then i guess we would have a problem if port 8000 is busy and right now it exposes 2 ports (the app and chroma server) so if you open the chroma server port from the browser it shows nothing

@jeffmaury
Copy link
Contributor Author

In the readme they say that we have to set the env variable VECTORDB_HOST but this is not something that we do, no? 🤔

Ah ok, it works bc by default it calls to port 8000, but the chroma db is empty. Shouldn't we offer to the user a way to add a document to fill the chroma_db, otherwise it's not really useful to use a rag.
That is implemented by the application

Then i guess we would have a problem if port 8000 is busy and right now it exposes 2 ports (the app and chroma server) so if you open the chroma server port from the browser it shows nothing

Copy link
Contributor

@axel7083 axel7083 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I am having some issue with the chromadb-server raising a lot of errors in the logs

ERROR:    [06-06-2024 12:11:36] Collection test_collection does not exist.
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 97, in receive
    return self.receive_nowait()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 92, in receive_nowait
    raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 159, in call_next
    message = await recv_stream.receive()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 112, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/chroma/chromadb/server/fastapi/__init__.py", line 78, in catch_exceptions_middleware
    return await call_next(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/server/fastapi/__init__.py", line 92, in check_http_version_middleware
    return await call_next(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/telemetry/opentelemetry/__init__.py", line 130, in wrapper
    return await f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/server/fastapi/__init__.py", line 729, in delete_collection
    await to_thread.run_sync(
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/telemetry/opentelemetry/__init__.py", line 143, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/api/segment.py", line 356, in delete_collection
    raise ValueError(f"Collection {name} does not exist.")
ValueError: Collection test_collection does not exist.

@jeffmaury
Copy link
Contributor Author

image

I am having some issue with the chromadb-server raising a lot of errors in the logs

ERROR:    [06-06-2024 12:11:36] Collection test_collection does not exist.
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 97, in receive
    return self.receive_nowait()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 92, in receive_nowait
    raise WouldBlock
anyio.WouldBlock

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 159, in call_next
    message = await recv_stream.receive()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/streams/memory.py", line 112, in receive
    raise EndOfStream
anyio.EndOfStream

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/chroma/chromadb/server/fastapi/__init__.py", line 78, in catch_exceptions_middleware
    return await call_next(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 189, in __call__
    with collapse_excgroups():
  File "/usr/local/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/usr/local/lib/python3.11/site-packages/starlette/_utils.py", line 93, in collapse_excgroups
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 191, in __call__
    response = await self.dispatch_func(request, call_next)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/server/fastapi/__init__.py", line 92, in check_http_version_middleware
    return await call_next(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 165, in call_next
    raise app_exc
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 151, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/telemetry/opentelemetry/__init__.py", line 130, in wrapper
    return await f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/server/fastapi/__init__.py", line 729, in delete_collection
    await to_thread.run_sync(
  File "/usr/local/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/telemetry/opentelemetry/__init__.py", line 143, in wrapper
    return f(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^
  File "/chroma/chromadb/api/segment.py", line 356, in delete_collection
    raise ValueError(f"Collection {name} does not exist.")
ValueError: Collection test_collection does not exist.

That has been discussed with the AI Lab recipes team. That's because the database is empty when it starts so the cleanup of collection fails once (ie when the first document is submitted), they are going to fix it but feature whise the recipe is ok

@feloy
Copy link
Contributor

feloy commented Jun 13, 2024

I'm getting this error at the step Building rag-inference-app:

Something went wrong while building the image: building at STEP "RUN pip install --no-cache-dir --upgrade -r /rag/requirements.txt": while running runtime: exit status 1

When I run the build manually, I get:

$ podman build -f Containerfile .
[...]
INFO: pip is looking at multiple versions of pymilvus to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 0.10.6 Requires-Python >=2.7, <3.6; 0.10.7 Requires-Python >=2.7, <3.6; 0.55.2 Requires-Python <3.5; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.7.2 Requires-Python >=3.7,<3.11; 1.7.3 Requires-Python >=3.7,<3.11; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11
ERROR: Could not find a version that satisfies the requirement milvus-lite<2.5.0,>=2.4.0 (from pymilvus) (from versions: none)
ERROR: No matching distribution found for milvus-lite<2.5.0,>=2.4.0
Error: building at STEP "RUN pip install --no-cache-dir --upgrade -r /rag/requirements.txt": while running runtime: exit status 1

@bmos300
Copy link

bmos300 commented Jun 14, 2024

I am trying to create a chatbot that I can easily create the RAG from all my .ppt files that we constantly use. Will this be possible?

@jeffmaury
Copy link
Contributor Author

I am trying to create a chatbot that I can easily create the RAG from all my .ppt files that we constantly use. Will this be possible?

The RAG recipe is limited to text and PDF files

@bmos300
Copy link

bmos300 commented Jun 14, 2024

I am trying to create a chatbot that I can easily create the RAG from all my .ppt files that we constantly use. Will this be possible?

The RAG recipe is limited to text and PDF files

I can definitely convert my .ppt to .pdf. That wont be an issue.

Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested again. I see this

image

@feloy
Copy link
Contributor

feloy commented Jun 17, 2024

Just tested again. I see this

image

It seems related to he latest version of langchain, I got the same issue this morning on ilab: instructlab/instructlab#1389

@bmos300
Copy link

bmos300 commented Jun 17, 2024

I am trying to bring up the rag recipe based on the instructions and I got to the 'Rag Demo' running on local host:8501. When I tried to uploade a 3.7MB pdf file. It crashed. Here is what I see:

/opt/app-root/lib64/python3.11/site-packages/langchain/_api/module_import.py:120: LangChainDeprecationWarning: Importing SentenceTransformerEmbeddings from langchain.embeddings is deprecated. Please replace deprecated imports:

>> from langchain.embeddings import SentenceTransformerEmbeddings

with new imports of:

>> from langchain_community.embeddings import SentenceTransformerEmbeddings

  warn_deprecated(
Connecting to 10.88.0.1:8000...
Empty VectorDB
Connecting to 10.88.0.1:8000...
Empty VectorDB
Clearing VectorDB...
Couldn't clear the collection possibly because it doesn't exist
Connecting to 10.88.0.1:8000...
Created a chunk of size 244, which is longer than the specified 150
Created a chunk of size 305, which is longer than the specified 150
Created a chunk of size 723, which is longer than the specified 150
Created a chunk of size 168, which is longer than the specified 150
Created a chunk of size 1237, which is longer than the specified 150
Created a chunk of size 243, which is longer than the specified 150
Created a chunk of size 511, which is longer than the specified 150
Created a chunk of size 442, which is longer than the specified 150
Created a chunk of size 305, which is longer than the specified 150
Created a chunk of size 155, which is longer than the specified 150
Created a chunk of size 225, which is longer than the specified 150
Created a chunk of size 252, which is longer than the specified 150
Created a chunk of size 304, which is longer than the specified 150
Created a chunk of size 159, which is longer than the specified 150
Created a chunk of size 346, which is longer than the specified 150
Created a chunk of size 468, which is longer than the specified 150
Created a chunk of size 282, which is longer than the specified 150
Created a chunk of size 153, which is longer than the specified 150
Created a chunk of size 320, which is longer than the specified 150
Created a chunk of size 305, which is longer than the specified 150
Created a chunk of size 632, which is longer than the specified 150
Created a chunk of size 268, which is longer than the specified 150
Created a chunk of size 412, which is longer than the specified 150
Created a chunk of size 350, which is longer than the specified 150
Created a chunk of size 325, which is longer than the specified 150
Created a chunk of size 193, which is longer than the specified 150
Created a chunk of size 211, which is longer than the specified 150
Created a chunk of size 299, which is longer than the specified 150
Created a chunk of size 271, which is longer than the specified 150
Created a chunk of size 165, which is longer than the specified 150
Created a chunk of size 214, which is longer than the specified 150
Created a chunk of size 220, which is longer than the specified 150
Created a chunk of size 182, which is longer than the specified 150
Created a chunk of size 180, which is longer than the specified 150
Created a chunk of size 365, which is longer than the specified 150
Created a chunk of size 569, which is longer than the specified 150
Created a chunk of size 217, which is longer than the specified 150
Created a chunk of size 342, which is longer than the specified 150
Created a chunk of size 165, which is longer than the specified 150
Created a chunk of size 281, which is longer than the specified 150
Created a chunk of size 592, which is longer than the specified 150
Created a chunk of size 255, which is longer than the specified 150
Created a chunk of size 173, which is longer than the specified 150
Created a chunk of size 225, which is longer than the specified 150
Created a chunk of size 238, which is longer than the specified 150
Created a chunk of size 342, which is longer than the specified 150
Created a chunk of size 194, which is longer than the specified 150
Created a chunk of size 177, which is longer than the specified 150
Created a chunk of size 473, which is longer than the specified 150
Created a chunk of size 249, which is longer than the specified 150
Created a chunk of size 231, which is longer than the specified 150
Created a chunk of size 177, which is longer than the specified 150
Created a chunk of size 408, which is longer than the specified 150
Created a chunk of size 159, which is longer than the specified 150
Created a chunk of size 206, which is longer than the specified 150
Created a chunk of size 155, which is longer than the specified 150
Created a chunk of size 225, which is longer than the specified 150
Created a chunk of size 151, which is longer than the specified 150
Created a chunk of size 180, which is longer than the specified 150
Created a chunk of size 313, which is longer than the specified 150
Created a chunk of size 171, which is longer than the specified 150
Created a chunk of size 193, which is longer than the specified 150
Created a chunk of size 349, which is longer than the specified 150
Created a chunk of size 180, which is longer than the specified 150
Created a chunk of size 212, which is longer than the specified 150
Created a chunk of size 184, which is longer than the specified 150
Created a chunk of size 337, which is longer than the specified 150
Created a chunk of size 289, which is longer than the specified 150
Created a chunk of size 373, which is longer than the specified 150
Created a chunk of size 330, which is longer than the specified 150
Created a chunk of size 156, which is longer than the specified 150
Created a chunk of size 179, which is longer than the specified 150
Created a chunk of size 379, which is longer than the specified 150
Created a chunk of size 373, which is longer than the specified 150
Created a chunk of size 182, which is longer than the specified 150
Created a chunk of size 687, which is longer than the specified 150
Created a chunk of size 364, which is longer than the specified 150
Created a chunk of size 159, which is longer than the specified 150
Created a chunk of size 191, which is longer than the specified 150
Created a chunk of size 248, which is longer than the specified 150
Created a chunk of size 192, which is longer than the specified 150
Created a chunk of size 415, which is longer than the specified 150
Created a chunk of size 679, which is longer than the specified 150
Created a chunk of size 349, which is longer than the specified 150
Created a chunk of size 159, which is longer than the specified 150
Created a chunk of size 191, which is longer than the specified 150
Created a chunk of size 248, which is longer than the specified 150
Created a chunk of size 192, which is longer than the specified 150
Created a chunk of size 335, which is longer than the specified 150
Created a chunk of size 178, which is longer than the specified 150
Created a chunk of size 335, which is longer than the specified 150
Created a chunk of size 189, which is longer than the specified 150
Created a chunk of size 362, which is longer than the specified 150
Created a chunk of size 199, which is longer than the specified 150
Created a chunk of size 159, which is longer than the specified 150
Created a chunk of size 191, which is longer than the specified 150
Created a chunk of size 225, which is longer than the specified 150
Created a chunk of size 161, which is longer than the specified 150
Created a chunk of size 335, which is longer than the specified 150
Created a chunk of size 201, which is longer than the specified 150
Created a chunk of size 335, which is longer than the specified 150
Created a chunk of size 189, which is longer than the specified 150
Created a chunk of size 172, which is longer than the specified 150
Created a chunk of size 177, which is longer than the specified 150
Created a chunk of size 271, which is longer than the specified 150
Created a chunk of size 199, which is longer than the specified 150
Created a chunk of size 191, which is longer than the specified 150
Created a chunk of size 225, which is longer than the specified 150
Created a chunk of size 161, which is longer than the specified 150
Created a chunk of size 335, which is longer than the specified 150
Created a chunk of size 263, which is longer than the specified 150
Created a chunk of size 287, which is longer than the specified 150
Created a chunk of size 173, which is longer than the specified 150
Created a chunk of size 166, which is longer than the specified 150
Created a chunk of size 272, which is longer than the specified 150
Created a chunk of size 176, which is longer than the specified 150
Created a chunk of size 206, which is longer than the specified 150
Created a chunk of size 239, which is longer than the specified 150
Created a chunk of size 430, which is longer than the specified 150
Created a chunk of size 353, which is longer than the specified 150
Created a chunk of size 210, which is longer than the specified 150
Created a chunk of size 307, which is longer than the specified 150
Created a chunk of size 296, which is longer than the specified 150
Created a chunk of size 167, which is longer than the specified 150
Created a chunk of size 260, which is longer than the specified 150
Created a chunk of size 1032, which is longer than the specified 150
Created a chunk of size 226, which is longer than the specified 150
Created a chunk of size 198, which is longer than the specified 150
Created a chunk of size 286, which is longer than the specified 150
Created a chunk of size 209, which is longer than the specified 150
Created a chunk of size 255, which is longer than the specified 150
Created a chunk of size 336, which is longer than the specified 150
Created a chunk of size 969, which is longer than the specified 150
Created a chunk of size 155, which is longer than the specified 150
Created a chunk of size 279, which is longer than the specified 150
Created a chunk of size 219, which is longer than the specified 150
Created a chunk of size 179, which is longer than the specified 150
Created a chunk of size 158, which is longer than the specified 150
Created a chunk of size 255, which is longer than the specified 150
Created a chunk of size 173, which is longer than the specified 150
Created a chunk of size 173, which is longer than the specified 150
Created a chunk of size 168, which is longer than the specified 150
Created a chunk of size 161, which is longer than the specified 150
Created a chunk of size 193, which is longer than the specified 150
Created a chunk of size 165, which is longer than the specified 150
Created a chunk of size 704, which is longer than the specified 150
Created a chunk of size 261, which is longer than the specified 150
Created a chunk of size 165, which is longer than the specified 150
Created a chunk of size 243, which is longer than the specified 150
Created a chunk of size 287, which is longer than the specified 150
Created a chunk of size 203, which is longer than the specified 150
Created a chunk of size 630, which is longer than the specified 150
Created a chunk of size 180, which is longer than the specified 150
Created a chunk of size 410, which is longer than the specified 150
Created a chunk of size 157, which is longer than the specified 150
Created a chunk of size 169, which is longer than the specified 150
Created a chunk of size 537, which is longer than the specified 150
Created a chunk of size 219, which is longer than the specified 150
Created a chunk of size 170, which is longer than the specified 150
Created a chunk of size 209, which is longer than the specified 150
Created a chunk of size 547, which is longer than the specified 150
Created a chunk of size 227, which is longer than the specified 150
Created a chunk of size 170, which is longer than the specified 150
Created a chunk of size 227, which is longer than the specified 150
Created a chunk of size 387, which is longer than the specified 150
Created a chunk of size 233, which is longer than the specified 150
Created a chunk of size 219, which is longer than the specified 150
Created a chunk of size 170, which is longer than the specified 150
Created a chunk of size 309, which is longer than the specified 150
Created a chunk of size 362, which is longer than the specified 150
Created a chunk of size 225, which is longer than the specified 150
Created a chunk of size 216, which is longer than the specified 150
Created a chunk of size 259, which is longer than the specified 150
Created a chunk of size 206, which is longer than the specified 150
Created a chunk of size 372, which is longer than the specified 150
Created a chunk of size 352, which is longer than the specified 150
Created a chunk of size 216, which is longer than the specified 150
Created a chunk of size 253, which is longer than the specified 150
Created a chunk of size 405, which is longer than the specified 150
Created a chunk of size 244, which is longer than the specified 150
Created a chunk of size 202, which is longer than the specified 150
Created a chunk of size 378, which is longer than the specified 150
Created a chunk of size 722, which is longer than the specified 150
Created a chunk of size 896, which is longer than the specified 150
Created a chunk of size 821, which is longer than the specified 150
Created a chunk of size 210, which is longer than the specified 150
Created a chunk of size 232, which is longer than the specified 150
Created a chunk of size 631, which is longer than the specified 150
Created a chunk of size 321, which is longer than the specified 150
Created a chunk of size 401, which is longer than the specified 150
Created a chunk of size 293, which is longer than the specified 150
Created a chunk of size 240, which is longer than the specified 150
Created a chunk of size 157, which is longer than the specified 150
Created a chunk of size 247, which is longer than the specified 150
Created a chunk of size 245, which is longer than the specified 150
Created a chunk of size 672, which is longer than the specified 150
Created a chunk of size 239, which is longer than the specified 150
Created a chunk of size 347, which is longer than the specified 150
Created a chunk of size 319, which is longer than the specified 150
Created a chunk of size 299, which is longer than the specified 150
Created a chunk of size 251, which is longer than the specified 150
Created a chunk of size 177, which is longer than the specified 150
Created a chunk of size 233, which is longer than the specified 150
Created a chunk of size 365, which is longer than the specified 150
Created a chunk of size 175, which is longer than the specified 150
Created a chunk of size 283, which is longer than the specified 150
Created a chunk of size 170, which is longer than the specified 150
Created a chunk of size 210, which is longer than the specified 150
Created a chunk of size 290, which is longer than the specified 150
Created a chunk of size 358, which is longer than the specified 150
Created a chunk of size 162, which is longer than the specified 150
Created a chunk of size 478, which is longer than the specified 150
Created a chunk of size 399, which is longer than the specified 150
Created a chunk of size 222, which is longer than the specified 150
Created a chunk of size 310, which is longer than the specified 150
Created a chunk of size 232, which is longer than the specified 150
Created a chunk of size 234, which is longer than the specified 150
Created a chunk of size 229, which is longer than the specified 150
Created a chunk of size 346, which is longer than the specified 150
Created a chunk of size 153, which is longer than the specified 150
Created a chunk of size 257, which is longer than the specified 150
Created a chunk of size 322, which is longer than the specified 150
Created a chunk of size 158, which is longer than the specified 150
Created a chunk of size 161, which is longer than the specified 150
Created a chunk of size 186, which is longer than the specified 150
Created a chunk of size 348, which is longer than the specified 150
Created a chunk of size 193, which is longer than the specified 150
Created a chunk of size 151, which is longer than the specified 150
Created a chunk of size 204, which is longer than the specified 150
Created a chunk of size 255, which is longer than the specified 150
Created a chunk of size 345, which is longer than the specified 150
Created a chunk of size 169, which is longer than the specified 150
Created a chunk of size 241, which is longer than the specified 150
Created a chunk of size 398, which is longer than the specified 150
Created a chunk of size 288, which is longer than the specified 150
Created a chunk of size 163, which is longer than the specified 150
The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.
0it [00:00, ?it/s]
modules.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 349/349 [00:00<00:00, 3.23MB/s]
config_sentence_transformers.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 124/124 [00:00<00:00, 1.09MB/s]
README.md: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 94.6k/94.6k [00:00<00:00, 2.93MB/s]
sentence_bert_config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 52.0/52.0 [00:00<00:00, 559kB/s]
/opt/app-root/lib64/python3.11/site-packages/huggingface_hub/file_download.py:1132: FutureWarning: `resume_download` is deprecated and will be removed in version 1.0.0. Downloads always resume when possible. If you want to force a new download, use `force_download=True`.
  warnings.warn(
config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 777/777 [00:00<00:00, 7.16MB/s]
model.safetensors:  34%|██████████████████████████████████████████████████████████████████████▋                                                                                                                                            | 147M/438M [00:03<00:06, 42.6MB/s]ERRO[1169] Failed to check if e5ff46e3637b3ce63f06f4df5d1b53337515d60d1b18821353387d4604eb992f should restart: Post "http://d/v5.1.1/libpod/containers/e5ff46e3637b3ce63f06f4df5d1b53337515d60d1b18821353387d4604eb992f/shouldrestart": EOF 
Error: Post "http://d/v5.1.1/libpod/containers/e5ff46e3637b3ce63f06f4df5d1b53337515d60d1b18821353387d4604eb992f/wait": EOF

That being said. I did not fully understand what was meant here so I did not do this:

from huggingface_hub import snapshot_download
snapshot_download(repo_id="BAAI/bge-base-en-v1.5",
                cache_dir="models/",
                local_files_only=False)

In fact it crashed really hard. It totally took down podman.

@lstocchi
Copy link
Contributor

Tried again and it worked perfectly
image

Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TBH idk why we are getting these random outputs but it is working now for me

@jeffmaury jeffmaury merged commit e530369 into containers:main Jun 21, 2024
4 checks passed
@jeffmaury jeffmaury deleted the GH-474 branch June 21, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RAG Sample application
6 participants