Skip to content
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

Add start, stop, and temporal_policy to FeatureVector and FeatureVectorArray #549

Merged
merged 5 commits into from
Oct 15, 2024

Conversation

jparismorgan
Copy link
Collaborator

What

Add start, stop, and temporal_policy to FeatureVector and FeatureVectorArray. This will let us call ingest_parts() on batches of vectors from Python for the new IVF_PQ out-of-core work.

Testing

  • New tests pass.
  • Existing tests pass.

@jparismorgan jparismorgan marked this pull request as ready for review October 15, 2024 08:00
py::arg("ctx"),
py::arg("uri"),
py::arg("first_col") = 0,
py::arg("first_col") = 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last_col

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

},
py::keep_alive<1, 2>(), // FeatureVectorArray should keep ctx alive.
py::arg("ctx"),
py::arg("uri"),
py::arg("ids_uri") = "",
py::arg("num_vectors") = 0,
py::arg("first_col") = 0,
py::arg("first_col") = 0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

last_col

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, done.

ctx,
parts_array_uri,
ids_array_uri,
0,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better readability, it would be nice to follow the pattern bellow for such arguments

 data = vspy.FeatureVectorArray(
            ctx,
            parts_array_uri,
            ids_array_uri,
            /* first_col */ 0,
            /* last_col */ 0,
            to_temporal_policy(index_timestamp),
)

Copy link
Collaborator Author

@jparismorgan jparismorgan Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thanks, done (though note it's a little different than this b/c a Python comment).

@jparismorgan jparismorgan merged commit 36978a6 into main Oct 15, 2024
6 checks passed
@jparismorgan jparismorgan deleted the jparismorgan/feature-vector-and-array-start-stop branch October 15, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants