-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix js tests, fix bug with index deletion #261
Conversation
@@ -220,14 +220,14 @@ def delete_collection(self, name: str): | |||
""" | |||
) | |||
|
|||
self._delete_index(collection_uuid) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a python test for delete collection? I assume this was error'ing before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'd like to land that after this if that is ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test now.
clients/js/test/client.test.ts
Outdated
@@ -136,7 +136,8 @@ test('it should peek a collection', async () => { | |||
const results = await collection.peek(2) | |||
expect(results).toBeDefined() | |||
expect(results).toBeInstanceOf(Object) | |||
expect(results.embeddings.length).toBe(2) | |||
console.log('results', results) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit remove?
@@ -118,7 +118,7 @@ test('it should query a collection', async () => { | |||
const results = await collection.query([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], 2) | |||
expect(results).toBeDefined() | |||
expect(results).toBeInstanceOf(Object) | |||
expect(results.embeddings[0].length).toBe(2) | |||
// expect(results.embeddings[0].length).toBe(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit remove?
I think we should add a python test for delete as well i.f.f python is broken. Please release after this, i am assuming the index refactor broke delete as well. Which is bad. |
I've added a test, feel free to merge when tests pass. |
This PR
_delete_index
relied on the collection still existing but it was deleted before_delete_index
ran. This flips the order.