Skip to content

Notebook: model_averaging #412

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

Closed
wants to merge 6 commits into from
Closed

Notebook: model_averaging #412

wants to merge 6 commits into from

Conversation

reshamas
Copy link
Contributor

@reshamas reshamas commented Aug 7, 2022

{Insert Description}

Helpful links

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@OriolAbril
Copy link
Member

OriolAbril commented Aug 9, 2022

Not sure if I should comment here or on #411, I hope here is fine. The root of your problems is not pre-commit but git itself.

You can see that the PR is suggestiong changes for 4 files, not 2 only as it should. There are changes to the bayes factor notebook that get included in this PR, and in addition, the changes in that notebook are git conflict messages which break the ipynb file as they are not valid json. Therefore, most of the pre-commit tasks fail, not only jupytext, see black error message or isort error message and how they are 1) related to bayes factor notebook, not to model averaging one and 2) related to json errors, not to the check failing.

If I look at https://github.com/reshamas/pymc-examples/tree/main, I see a message that says "This branch is 5 commits ahead of pymc-devs:main.", which is a bad indicator. That means that all new branches you generate from main will contain those extra commits even before you make the changes you want to submit a PR for, and those changes are the git conflict json breaking ones. My recommendation is to delete the main branch in your local repository and create it again from the main branch in upstream (aka pymc-examples, not the one on your fork). Eventually, force push to origin (do not pull before force pushing or you'll be back at step 0) so that your fork also has its main branch synced with the main branch in pymc examples.

WARNING: I have not tested these commands, but I belive you'll need to do something like the commands below while not being on the main branch. Do not force push if the git status checks don't match the comments

git fetch upstream
git branch -D main
git checkout -b main upstream/main
# here git status should say your are now on branch main that tracks upstream/main
git branch main --set-upstream-to=origin/main
# here git status should say you are on branch main that tracks origin/main
git push --force

from here you should now be able to create new PRs without git conflicts or broken CI from the first commit. To fix this PR you would need to rebase (not exactly sure how though, would need to see it firsthand) or alternatively copy the model averaging notebook, create a new branch from main and then paste the notebook onto the new branch so you can open a new PR without changes to bayes factor, only to model averaging.

@reshamas reshamas mentioned this pull request Aug 9, 2022
3 tasks
This pull request was closed.
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.

2 participants