Skip to content

Add transformation information to --info #1462

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

WardBrian
Copy link
Member

@WardBrian WardBrian commented Oct 30, 2024

Closes #1461.

Bikeshedding: Should this new field be called constraint, transform, or something else?

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

The --info flag will now also give information about the transformations of each variable

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.

Project coverage is 89.53%. Comparing base (93cda2f) to head (0b59a0a).

Files with missing lines Patch % Lines
src/frontend/Info.ml 67.74% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1462      +/-   ##
==========================================
- Coverage   89.60%   89.53%   -0.08%     
==========================================
  Files          66       66              
  Lines        9707     9734      +27     
==========================================
+ Hits         8698     8715      +17     
- Misses       1009     1019      +10     
Files with missing lines Coverage Δ
src/frontend/Info.ml 82.75% <67.74%> (-8.91%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WardBrian
Copy link
Member Author

Would be easy to revisit if we wanted to, but doesn't seem like the original request went anywhere

@WardBrian WardBrian closed this Feb 27, 2025
@andrewfowlie
Copy link

Hi Brian, was there a lack of support for this change? Let me know if I can help resurrect it.

@WardBrian
Copy link
Member Author

Hi Andrew -- after you closed #1461 it seemed like there wasn't a use case for this so I never requested a code review. If it's still useful we could reopen it for discussion

@andrewfowlie
Copy link

I have workarounds, but this would be a much more elegant solution. I think having these tools to inspect a Stan model can only help algorithm developers.

If it is more or less implemented (modulo review) I would for sure appreciate it if it could be reviewed and merged. But just my opinion :)

@WardBrian WardBrian reopened this Apr 22, 2025
"dimensions": 1,
"constraint": "positive_ordered"
},
"p": { "type": "real", "dimensions": 2, "constraint": "covariance" },
Copy link
Contributor

Choose a reason for hiding this comment

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

Kind of confused on the output format here. Is there a reason this is not "type": "matrix"?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm frankly not sure, but that behavior has been the case since the flag was added in #810

My guess is that it let the output be non-recursive pre-tuples, because array[N] matrix[M,K] just got collapsed to dimensions: 3

@SteveBronder
Copy link
Contributor

Can you have the tests show what this looks for more complex types like tuples or arrays of arrays of matrices etc?

@WardBrian
Copy link
Member Author

Can you have the tests show what this looks for more complex types like tuples or arrays of arrays of matrices etc?

info.stan already has both nested tuples and arrays of matrices, is there something specific you'd like to see?

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

Successfully merging this pull request may close these issues.

--info include information parameter transforms
3 participants