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

[Good First Issue]: Support aten::logit, aten::special_logit #28744

Open
code-dev05 opened this issue Jan 30, 2025 · 8 comments
Open

[Good First Issue]: Support aten::logit, aten::special_logit #28744

code-dev05 opened this issue Jan 30, 2025 · 8 comments
Assignees
Labels
category: PyTorch FE OpenVINO PyTorch Frontend good first issue Good for newcomers no_stale Do not mark as stale

Comments

@code-dev05
Copy link

code-dev05 commented Jan 30, 2025

Context

Context
OpenVINO component responsible for support of PyTorch models is called as PyTorch Frontend (PT FE). PT FE converts a model represented as TorchScript model to a model in OpenVINO opset.

Add Support for the following operations:
aten::logit

What needs to be done?

Implement conversion rule and/or transformation to support the new operation.
Implement operation tests in tests/layer_tests/pytorch_tests. Please consider different data types, but keep reasonable number of test cases

Example Pull Requests
#18998

Resources

Contact points

@openvinotoolkit/openvino-pytorch-frontend-maintainers

No response

@code-dev05 code-dev05 added good first issue Good for newcomers no_stale Do not mark as stale labels Jan 30, 2025
@github-project-automation github-project-automation bot moved this to Contributors Needed in Good first issues Jan 30, 2025
@code-dev05
Copy link
Author

.take

Copy link
Contributor

Thank you for looking into this issue! Please let us know if you have any questions or require any help.

@mlukasze mlukasze moved this from Contributors Needed to Assigned in Good first issues Jan 30, 2025
@code-dev05
Copy link
Author

I have been trying to implement this operation and facing difficulty with the decomposition. It would be great if you could help me figure it out.

@mvafin

@mvafin
Copy link
Contributor

mvafin commented Feb 7, 2025

I have been trying to implement this operation and facing difficulty with the decomposition. It would be great if you could help me figure it out.

@mvafin

@code-dev05 Check the formula here https://pytorch.org/docs/stable/special.html#torch.special.logit
If the eps is not None you need to clamp the input with Clamp-1, if it is None, then leave as-is.
After that apply the formula for ln(z/(1-z))

@mvafin mvafin changed the title [Good First Issue]: Support for operations PyTorch Frontend (PT FE) [Good First Issue]: Support aten::logit Feb 7, 2025
@mvafin mvafin added the category: PyTorch FE OpenVINO PyTorch Frontend label Feb 7, 2025
@mvafin mvafin changed the title [Good First Issue]: Support aten::logit [Good First Issue]: Support aten::logit, aten::special_logit Feb 7, 2025
@mvafin
Copy link
Contributor

mvafin commented Feb 7, 2025

Please also support aten::special_logit as it seems to be just an alias to the same operation.

@code-dev05
Copy link
Author

Yes I will try to do that.

@code-dev05
Copy link
Author

Can we perform the operation 1 - z by using a constant 1 and doing subtraction with z?

@mvafin
Copy link
Contributor

mvafin commented Feb 7, 2025

Can we perform the operation 1 - z by using a constant 1 and doing subtraction with z?

Yes, that is exactly what is needed Subtract(Constant(1), clamped_input)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: PyTorch FE OpenVINO PyTorch Frontend good first issue Good for newcomers no_stale Do not mark as stale
Projects
Status: Assigned
Development

No branches or pull requests

2 participants