Skip to content

Conversation

@oliverholworthy
Copy link
Contributor

Update compute_dims function to use new shape property.

@oliverholworthy oliverholworthy added the chore Maintenance for the repository label Feb 13, 2023
@oliverholworthy oliverholworthy added this to the Merlin 23.02 milestone Feb 13, 2023
@oliverholworthy oliverholworthy self-assigned this Feb 13, 2023
@github-actions
Copy link

Documentation preview

https://nvidia-merlin.github.io/systems/review/pr-288

) -> Schema:
"""Describe the operator's outputs"""
return Schema([ColumnSchema("ordered_ids", dtype=np.int32, is_list=True, is_ragged=False)])
return Schema([ColumnSchema("ordered_ids", dtype=np.int32, dims=(None, 1))])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We now need to specify the second dimensiion output size as 1 so that the output is fixed size and returns a single ordered_ids in the Triton config instead of split into values/lengths

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(None, 1) matches the return shape of (-1, 1) from the transform method. There may be some follow-up work to make this operator work on more than one batch at a time instead of only the one that it assumes currently.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch! Agreed on the follow-up work, that’s been on our list for a while but we decided it would be easier to tackle after we did the shapes migration.

@oliverholworthy oliverholworthy merged commit e4bf45a into NVIDIA-Merlin:main Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance for the repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants