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

Fix StanMetaRegression estimator #108

Merged
merged 22 commits into from
Apr 4, 2024
Merged

Conversation

JulioAPeraza
Copy link
Collaborator

Closes #67.

Changes proposed in this pull request:

  • Update the StanMetaRegression code to work with the new PyStan's API (PyStan 3).
  • Remove warning.
  • Enable test_stan_estimators.

@JulioAPeraza JulioAPeraza added the bug Something isn't working label Jun 14, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2022

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 90.85%. Comparing base (1402199) to head (e56e294).
Report is 7 commits behind head on master.

Files Patch % Lines
pymare/estimators/estimators.py 80.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
+ Coverage   87.79%   90.85%   +3.06%     
==========================================
  Files          13       13              
  Lines         893      897       +4     
==========================================
+ Hits          784      815      +31     
+ Misses        109       82      -27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JulioAPeraza
Copy link
Collaborator Author

Tests on Python 3.6 are failing because PyStan 3 only works for Python 3.7+. @tsalo, do you think we should remove the test on 3.6 completely, or there is a way to just skip 3.6 for test_stan_estimators?

The other tests on ubuntu-latest (20.04.4) failed with an error that was already reported here: https://discourse.mc-stan.org/t/schools-example-not-compiling-pystan-3-4-on-ubuntu-20-04-4/27812.

@tsalo
Copy link
Member

tsalo commented Jun 14, 2022

I'm thinking that we should (1) mark the pystan tests with a decorator and try to skip them with 3.6, (2) ensure that pystan is an optional dependency, (3) include in our documentation that users should not try using pystan with PyMARE and Python 3.6, and (4) add some type of warning based on the import and Python version within the StanMetaRegression estimator at initialization.

@JulioAPeraza
Copy link
Collaborator Author

Thanks! I have added the decorators and included pystan as an optional dependency and the tests are now passing. I still need to find what's happening to the test on ubuntu-latest (20.04.4).

@JulioAPeraza
Copy link
Collaborator Author

Now all tests are passing after switching to ubuntu 20.04 for Python 3.6.
@tsalo Is there anything else you would like to see in this PR?

@jdkent jdkent self-requested a review March 28, 2023 18:40
Copy link
Member

@jdkent jdkent left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @JulioAPeraza!

@jdkent jdkent merged commit c38b0bb into neurostuff:master Apr 4, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problems with PyStan
4 participants