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

Pass size of model data #63

Closed
kpu opened this issue Mar 22, 2021 · 2 comments
Closed

Pass size of model data #63

kpu opened this issue Mar 22, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kpu
Copy link
Member

kpu commented Mar 22, 2021

We can't just pass a void * for the model data. There needs to be some validation that the size allocated by the client is consistent with the size encoded in the model.

@jerinphilip
Copy link
Contributor

Does it make sense to abstract the datatype here (const void *data, size_t size) and reuse it for shortlist as well? I found the following in #28 (comment).

class MemoryGift {
  const char *data() const;
  size_t length() const;
  void early_free();
};

Does it make sense to bundle these for model, shortlist (seeing as to someone who'd use bytearray uses it for efficiency purposes) and unpack it at BatchTranslator (where these are loaded)? Vocabulary I'm not sure, but it's required at service as well.

@abhi-agg
Copy link
Contributor

@XapaJIaMnu Can we close this issue? I think #94 was the last missing PR to close this one. Right?

@kpu kpu closed this as completed Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants