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

feat: extent based namespaces #3208

Merged

Conversation

jackgerrits
Copy link
Member

No description provided.

@jackgerrits jackgerrits marked this pull request as ready for review August 6, 2021 17:53
@jackgerrits jackgerrits changed the title feat: [WIP] extent based namespaces feat: extent based namespaces Aug 6, 2021
vowpalwabbit/feature_group.cc Show resolved Hide resolved
vowpalwabbit/feature_group.h Show resolved Hide resolved
vowpalwabbit/feature_group.h Outdated Show resolved Hide resolved
@@ -140,13 +248,50 @@ bool features::sort(uint64_t parse_mask)
apply_permutation_in_place(values, dest_index_vec);
Copy link
Member

Choose a reason for hiding this comment

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

Worried about allocations that can happen in steady state:

  1. sort operation (seems avoidable)
  2. flatten_namespace

Copy link
Member Author

Choose a reason for hiding this comment

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

Sort is very rarely used, it is only used with limit and sort_features. It is also done only once per example, so in practice this will not matter. Trying to extend what the existing sort implementation was doing to include extents would be quite impractical.

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed the apply function was rolled into one to avoid reallocating the done vec

@@ -10,6 +10,7 @@ table Namespace {
name:string;
hash:uint8;
features:[Feature];
full_hash:uint64;
Copy link
Member

Choose a reason for hiding this comment

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

a /// comment for this element would be useful.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do. I'd rather call this hash but that is already taken by the other element which is really the index.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah. I agree with your preference.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should I switch them? I am worried that will break things. What do you think?

Copy link
Member Author

Choose a reason for hiding this comment

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

Going to leave as is with a comment

@@ -10,6 +10,7 @@ table Namespace {
name:string;
hash:uint8;
Copy link
Member

Choose a reason for hiding this comment

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

a /// comment for this element would be useful.

@rajan-chari
Copy link
Member

@rajan-chari, the flatbuffer changes should be better now

Yep. Looks good. Thanks.

@jackgerrits jackgerrits merged commit 4f1596c into VowpalWabbit:master Sep 2, 2021
@jackgerrits jackgerrits deleted the jagerrit/extent_based_namespaces branch September 2, 2021 19:58
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.

None yet

4 participants