Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

HnswDocIndex cannot use two time the same workdir #1351

Closed

Description

@samsja

Context

using two time the same work_dir lead to error

from docarray import DocList
from docarray.documents import ImageDoc
from docarray.index import HnswDocumentIndex
import numpy as np

# create some data
dl = DocList[ImageDoc](
    [
        ImageDoc(
            url="https://upload.wikimedia.org/wikipedia/commons/2/2f/Alpamayo.jpg",
            tensor=np.zeros((3, 224, 224)),
            embedding=np.random.random((128,)),
        )
        for _ in range(100)
    ]
)

# create a Document Index
index = HnswDocumentIndex[ImageDoc](work_dir='/tmp/test_index2')
index = HnswDocumentIndex[ImageDoc](work_dir='/tmp/test_index2') # second time is failing

Activity

  1. moved this to Release Committed in DocArray backlogon Apr 11, 2023
  2. JohannesMessner commented on Apr 11, 2023

    @JohannesMessner
    Member

    assigned myself, but can't do it immediately. If someone wants to take it just lmk

  3. moved this from Release Committed to For later in DocArray backlogon Apr 12, 2023
  4. moved this from For later to In Progress in DocArray backlogon Apr 19, 2023
  5. JoanFM commented on Apr 22, 2023

    @JoanFM
    Member

    Closed by #1424

  6. moved this from In Progress to Done in DocArray backlogon Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions