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

Losing connection when working with vectordatabases on Windows #10638

Open
1 task done
LDelPinoNT opened this issue Feb 20, 2025 · 2 comments
Open
1 task done

Losing connection when working with vectordatabases on Windows #10638

LDelPinoNT opened this issue Feb 20, 2025 · 2 comments
Labels
bug Something isn't working needs repro Awaiting full reproduction

Comments

@LDelPinoNT
Copy link

Describe the bug

I have been working with chromadb and vicinity for RAG services and when I try to run them on Windows at certain point the connection is broken with no message. But the same code works perfectly on Ubuntu.

Any clue ? Maybe I'm missing any configuration param.
Thank you for your time!

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

Example code I'm running inside a gradio app:
MinishLab/semhash#48 (comment)

Screenshot

No response

Logs

System Info

Gradio Environment Information:
------------------------------
Operating System: Windows
gradio version: 5.16.2
gradio_client version: 1.7.1

------------------------------------------------
gradio dependencies in your environment:

aiofiles: 23.2.1
anyio: 4.8.0
audioop-lts is not installed.
fastapi: 0.115.8
ffmpy: 0.5.0
gradio-client==1.7.1 is not installed.
httpx: 0.28.1
huggingface-hub: 0.28.1
jinja2: 3.1.5
markupsafe: 2.1.5
numpy: 1.26.4
orjson: 3.10.15
packaging: 24.2
pandas: 2.2.3
pillow: 11.1.0
pydantic: 2.10.4
pydub: 0.25.1
python-multipart: 0.0.20
pyyaml: 6.0.2
ruff: 0.9.6
safehttpx: 0.1.6
semantic-version: 2.10.0
starlette: 0.45.3
tomlkit: 0.13.2
typer: 0.15.1
typing-extensions: 4.12.2
urllib3: 2.3.0
uvicorn: 0.34.0
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.


gradio_client dependencies in your environment:

fsspec: 2024.9.0
httpx: 0.28.1
huggingface-hub: 0.28.1
packaging: 24.2
typing-extensions: 4.12.2
websockets: 14.2

Severity

I can work around it

@LDelPinoNT LDelPinoNT added the bug Something isn't working label Feb 20, 2025
@abidlabs
Copy link
Member

abidlabs commented Feb 21, 2025

Hi @LDelPinoNT can you please a minimal code example, including the Gradio app, that we can use to reproduce the issue above? See: https://stackoverflow.com/help/minimal-reproducible-example

@abidlabs abidlabs added the needs repro Awaiting full reproduction label Feb 21, 2025
@LDelPinoNT
Copy link
Author

LDelPinoNT commented Feb 21, 2025

import gradio as gr
from datasets import load_dataset
from semhash import SemHash

async def generate():
    # Load a dataset to deduplicate
    dataset = load_dataset("ag_news", split="train")

    # Convert the dataset to a list of dictionaries
    records = [dict(row) for row in dataset]

    # Initialize a SemHash instance with the column(s) to deduplicate
    semhash = SemHash.from_records(records=records, columns=["text"])  # it stop working at this line

    # Deduplicate the texts
    deduplicated_records  = semhash.self_deduplicate().deduplicated
    print(deduplicated_records[0])



def gradio_app():


    with gr.Blocks() as app:
            submit_button = gr.Button("Submit")


            submit_button.click(generate,
                            show_progress="full")

    return app

if __name__ == "__main__":

    app = gradio_app()
    app.queue().launch(debug=True)

Here you are @abidlabs Please keep in mind that the instalation of semhash is needed for this example. Just pip install semhash

Let me know if you need something else. And thank you for your time in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs repro Awaiting full reproduction
Projects
None yet
Development

No branches or pull requests

2 participants