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

Model versioning #65

Open
shschaefer opened this issue Nov 28, 2023 · 1 comment
Open

Model versioning #65

shschaefer opened this issue Nov 28, 2023 · 1 comment

Comments

@shschaefer
Copy link
Contributor

Any given model will have an embedded assumption about the version(s) of backends that will be able to consume it. There may be differences in one or more of:

  • serialization format or intermediate representations
  • tensor data type support
  • operator versions

When a model is loaded in the API, the behavior of mismatch is undefined. There is an "invalid-encoding" error type, but this does not disambiguate between the model actually being invalid or if the requested backend cannot handle the version of the model provided given the requested execution target or otherwise. (Is this supposed to be an "invalid-operation"?, we should document the errors expected for each API).

One possible solution would be to simply default to the new proposal of extended error information supplied along with the error code. This would be backend specific, requiring the caller to understand the syntax of what is returned. In the case of autodetected execution targets, discriminating information may not exist.

An alternate solution would be to provide an enumeration API which defines the supported backends. A supported-encodings() API could provide the encoding value and an extended version string. For example, the onnx encoding would be paired with a string specifying the SemVer of the equivalent runtime, e.g. "1.14.1"

@ayakoakasaka
Copy link

I think it's up to the product to decide which solution to use, but if we're going to sell Wasm as a product, I think it has to be the latter.
You are using NN as an example here, but I think this enumeration API system will also be necessary for other systems. So I hope there will be a lively discussion about this.

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

No branches or pull requests

2 participants