1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] A section of code runs much faster in Conda environment, Why?

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024 às 11:22.

  1. Stack

    Stack Membro Participativo

    I was running this section of code in a a basic venv (python 3.9):

    if collection.count() == 0:
    collection.add(
    documents=documents,
    metadatas=metadatas,
    ids=ids
    )


    and it took about 11 minutes to execute. For reasons we needed to deploy it on a Conda environment (python 3.10) and the same code on the same machine only took 4 minutes to execute. Is there a specific reason for this? The package I am using is chromaDB and this section of code is creating a vector database.

    Machine: Mac Pro M1 pro 32gb

    I looked at the version differences and I am aware of faster memory management etc but this doesn't feel like a full explanation of the speed increase.

    Continue reading...

Compartilhe esta Página