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

Allow multiline tensor definitions in rank-profile #33439

Open
kjocevicius opened this issue Feb 27, 2025 · 0 comments
Open

Allow multiline tensor definitions in rank-profile #33439

kjocevicius opened this issue Feb 27, 2025 · 0 comments
Assignees
Milestone

Comments

@kjocevicius
Copy link

Is your feature request related to a problem? Please describe.
Currently it's not allowed to split tensor declaration into multiple lines. We're implementing reranking, using ONNX model in rank-profile. It accepts multiple tensors as inputs, and it is very inconvenient to have them in single line. While example is only 8 features, we have a tensor with 20 features as well.

function x_categorical() {
    expression: tensor<int8>(d0[1], d1[1], d2[8]):[attribute(first_id), attribute(second_id), attribute(third_id), attribute(fourth_id), attribute(fifth_id), attribute(sixth_id), attribute(seventh_id), some_other_parameter]
}

Describe the solution you'd like
It should be allowed to split tensor declaration to multiple lines, like:

function x_categorical() {
    expression: tensor<int8>(d0[1], d1[1], d2[8]):[
        attribute(first_id), 
        attribute(second_id), 
        attribute(third_id), 
        attribute(fourth_id), 
        attribute(fifth_id), 
        attribute(sixth_id), 
        attribute(seventh_id), 
        some_other_parameter
    ]
}

Describe alternatives you've considered

  • Making some template to work around this
  • Using Python to describe ranking profile, but it might be only long term solution to rewrite everything later
@hmusum hmusum added this to the soon milestone Mar 5, 2025
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

3 participants