-
Notifications
You must be signed in to change notification settings - Fork 7
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
Enable setting resource_class
or resources
when calling query()
on IVFFlatIndex
#165
Conversation
resources: | ||
A specification for the amount of resources to use when executing using TileDB cloud | ||
taskgraphs, of the form: {"cpu": "6", "memory": "12Gi", "gpu": 1}. Can only be used | ||
in REALTIME or BATCH mode. Cannot be used alongside resource_class. |
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: Can only be used in BATCH mode
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.
Oops thanks, good catch, updated.
A specification for the amount of resources to use when executing using TileDB cloud | ||
taskgraphs, of the form: {"cpu": "6", "memory": "12Gi", "gpu": 1}. Can only be used | ||
in REALTIME or BATCH mode. Cannot be used alongside resource_class. | ||
num_partitions: int |
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.
Duplicate documentation for num_partitions
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.
Thanks, good catch, removed.
resources: | ||
A specification for the amount of resources to use when executing using TileDB cloud | ||
taskgraphs, of the form: {"cpu": "6", "memory": "12Gi", "gpu": 1}. Can only be used | ||
in REALTIME or BATCH mode. Cannot be used alongside resource_class. |
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.
same as above, only BATCH mode
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.
Thanks, done.
@@ -268,6 +303,9 @@ def taskgraph_query( | |||
from tiledb.vector_search.module import (array_to_matrix, dist_qv, | |||
partition_ivf_index) | |||
|
|||
if resource_class and resources: |
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.
Add a check to make sure that resources
is not defined for REALTIME
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.
Sure, done. Originally I just let tiledb.cloud
throw this error, but you're right, that's inconsistent with how I'm handling other errors, so updated.
What
Adds
resource_class
andresources
toquery()
. These are only valid forMode.REALTIME
andMode.BATCH
. If not provided, the default islarge
. You cannot pass bothresource_class
andresources
.Testing