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

Implement tensor.special.logit helper #645

Merged
merged 5 commits into from
Mar 4, 2024

Conversation

HarshvirSandhu
Copy link
Contributor

Description

Implement tensor helper equivalent for scipy.special.logit

Related Issue

Checklist

  • Checked that the pre-commit linting/style checks pass
  • Included tests that prove the fix is effective or that the new feature works
  • Added necessary documentation (docstrings and/or example notebooks)

Type of change

  • New feature / enhancement

@ricardoV94
Copy link
Member

Looks pretty good, left just a cosmetic suggestion to the test

@ricardoV94
Copy link
Member

Pre-commit is failing though

Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

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

Thanks !

@ricardoV94 ricardoV94 changed the title Pytensor logit Implement special.logit helper Feb 13, 2024
@ricardoV94 ricardoV94 added the enhancement New feature or request label Feb 13, 2024
@ricardoV94 ricardoV94 changed the title Implement special.logit helper Implement tensor.special.logit helper Feb 13, 2024
@HarshvirSandhu
Copy link
Contributor Author

@ricardoV94
It looks like a test is failing on Python 3.12
But the test is not failing on my local computer.

@ricardoV94
Copy link
Member

ricardoV94 commented Feb 14, 2024

@ricardoV94 It looks like a test is failing on Python 3.12 But the test is not failing on my local computer.

Test is failing on float32, you can reproduce by adding this snippet at the top of the test file:

import pytensor
pytensor.config.floatX = "float32"

Probably just means you need to cast x_test to pytensor.config.floatX in the test (this happens all the time)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (28f2648) 80.83% compared to head (b798ab5) 80.82%.
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #645      +/-   ##
==========================================
- Coverage   80.83%   80.82%   -0.01%     
==========================================
  Files         162      162              
  Lines       46797    46814      +17     
  Branches    11434    11437       +3     
==========================================
+ Hits        37827    37838      +11     
- Misses       6722     6725       +3     
- Partials     2248     2251       +3     
Files Coverage Δ
pytensor/tensor/special.py 92.10% <100.00%> (+0.10%) ⬆️

... and 1 file with indirect coverage changes

@ricardoV94 ricardoV94 merged commit ad55b69 into pymc-devs:main Mar 4, 2024
53 checks passed
@ricardoV94
Copy link
Member

Thanks a lot @HarshvirSandhu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tensor helper equivalent for scipy.special.logit
3 participants