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 model pointer passed to callbacks #277

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Fix model pointer passed to callbacks #277

merged 1 commit into from
Nov 29, 2023

Conversation

odow
Copy link
Member

@odow odow commented Nov 29, 2023

This was changed in #143. But the change from ptr_model to model seems unintentional.

Based on the docstrings, it seems like it should be the pointer. It might be different to the one in model.

cc @frapac

@odow odow requested a review from frapac November 29, 2023 06:24
Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a72f2a9) 84.53% compared to head (1281372) 84.53%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #277   +/-   ##
=======================================
  Coverage   84.53%   84.53%           
=======================================
  Files           3        3           
  Lines         996      996           
=======================================
  Hits          842      842           
  Misses        154      154           

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

Copy link
Collaborator

@frapac frapac left a comment

Choose a reason for hiding this comment

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

This looks good to me. As far as I remember, we were passing model before to pass (implicitly) some user data. This is no longer the case as we can pass directly model.ms_process_user_data and model.mip_node_user_data now.

@odow
Copy link
Member Author

odow commented Nov 29, 2023

Yeah it seems like this is even a bug fix, because you'd be querying information from the base model, not from the current node that is being processed.

@odow odow merged commit c09d761 into master Nov 29, 2023
5 checks passed
@odow odow deleted the od/fix-callbacks branch November 29, 2023 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants