Skip to content

Getting pymongo.errors.ExecutionTimeout for using more than 1 instance of AsyncMinHashLSH #187

Open

Description

@RonaldRegan69

I have a use case where i have to store min hash of (n) different categories of file and the query them.
For example if i have documents of category A and I want to store all of them in one db and then query at later point.

I am initializing this in a microservice as (fastapi) as follows

@app.on_event("startup")
async def startup_event():
    LSHService.lsh_js, LSHService.lsh_css, LSHService.lsh_html, = await asyncio.gather(
        *[
            await AsyncMinHashLSH(
                storage_config={
                    **_storage,
                    "basename": "category-a".encode(),
                },
                threshold=0.9,
                num_perm=256,
            ),
            await AsyncMinHashLSH(
                storage_config={
                    **_storage,
                    "basename": "category-b".encode(),
                },
                threshold=0.9,
                num_perm=256,
            ),
            await AsyncMinHashLSH(
                storage_config={
                    **_storage,
                    "basename": "category-b".encode(),
                },
                threshold=0.9,
                num_perm=256,
            ),
        ]
    )

If i initialize like this i get
Getting pymongo.errors.ExecutionTimeout Error

However If i just maintain 1 object then I dont get any error.

What can I do mitigate this?
Thanks in advance

Activity

  1. ekzhu commented on Jun 7, 2022

    @ekzhu
    Owner

    Not an expert in async. @aastafiev would you be able to take a look?

  2. RonaldRegan69 commented on Jun 13, 2022

    @RonaldRegan69
    Author

    any update over this?

  3. aastafiev commented on Jun 13, 2022

    @aastafiev
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions