-
Notifications
You must be signed in to change notification settings - Fork 50
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
[BUG] Model schemas and serving signatures don't align with each other #924
Comments
Opened a PR to handle the output schema case (adding value count) for fixed length outputs here #926 For the ragged list inputs. So maybe dropping the value_count.min from the input schema would resolve this issue? |
Or does this issue also include the question of how should we represent the information about how a ragged feature |
If the models are completely flexible about sequence length, I suppose the minimum would be |
@sararb and @marcromeyn what does TF model expects for an input of a list of length 4? does it expect like |
For a general context: In merlin frameworks, the same list feature can be represented in three different formats: 1.TF dense tensor: all rows have the same fixed length:
2.TF RaggedTensor: a tf structure for variable-length lists
==> Merlin Models supports two inputs format:
You can see that in
|
|
Bug description
The saved input and output schema files for Tensorflow models contain information that doesn't match the saved model's serving signature. The serving signature also seems to record dimensions inconsistently.
Steps/Code to reproduce bug
Then compare the input and output schema (and especially the value counts) to the serving signature:
Two (potential?) issues:
(-1,1)
only has a variable length across the batch dimension and seems to expect one value per example instead of four.(-1, 48)
is correctly tracked in the serving signature, but the output schema doesn't contain corresponding value counts. We know it's a list from theis_list
flag and that it has a fixed shape from theis_ragged
flag, but we don't know what that fixed shape is from the schema.Expected behavior
(-1,-1)
in the serving signature(-1,fixed_length)
in the serving signature{min=48, max=48}
)Environment details
Additional context
We may not yet have a good way to transfer information about fixed shapes and variable shapes in the Merlin schemas/file format. If that's the crux of the issue, then it may be time to design our own Protobuf schema that matches the way we think about e.g. shapes instead of trying to force it. If trying to write a bug fix turns into a significant headache, that's probably a sign that there's a deeper issue for us to resolve, and it's totally fine at that point to close this bug as "won't fix" and wait for changes in Core to make it easier.
The text was updated successfully, but these errors were encountered: