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

Update PyROS Solver Argument Resolution and Validation Routines #3126

Merged
merged 47 commits into from
Feb 21, 2024

Conversation

shermanjasonaf
Copy link
Contributor

@shermanjasonaf shermanjasonaf commented Feb 7, 2024

Fixes #2428

Fixes #2437

Changes proposed in this PR:

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

Copy link

codecov bot commented Feb 12, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (922ea8e) 88.33% compared to head (3556a60) 88.35%.
Report is 23 commits behind head on main.

Files Patch % Lines
pyomo/contrib/pyros/config.py 97.93% 3 Missing ⚠️
pyomo/contrib/pyros/util.py 98.07% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3126      +/-   ##
==========================================
+ Coverage   88.33%   88.35%   +0.02%     
==========================================
  Files         833      834       +1     
  Lines       92648    92648              
==========================================
+ Hits        81836    81862      +26     
+ Misses      10812    10786      -26     
Flag Coverage Δ
linux 86.26% <98.12%> (+0.03%) ⬆️
osx 75.72% <97.65%> (+0.02%) ⬆️
other 86.45% <98.12%> (+0.03%) ⬆️
win 83.68% <98.12%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

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

A couple comments after a quick read-through

pyomo/contrib/pyros/config.py Outdated Show resolved Hide resolved
pyomo/contrib/pyros/config.py Outdated Show resolved Hide resolved
pyomo/contrib/pyros/pyros.py Outdated Show resolved Hide resolved
pyomo/contrib/pyros/uncertainty_sets.py Outdated Show resolved Hide resolved
Copy link
Member

@jsiirola jsiirola left a comment

Choose a reason for hiding this comment

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

This is fine to merge. Longer term, I'd like kto revisit if we need as many functors as we currently have.

default_pyros_solver_logger = setup_pyros_logger()


class LoggerType:
Copy link
Member

Choose a reason for hiding this comment

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

Why is this (and PositiveIntOrMinusOne below) a functor and not just a plain function? Is it just so that you can define the domain_name() method? If that is the case, then I think we should update ConfigValue to allow for domain_name to just be an attribute - then these can be simple functions and not need to be full classes / instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to define the domain_name() method. I agree that updating ConfigValue to make domain_name an attribute would help simplify.

@blnicho blnicho merged commit 3e9dd9e into Pyomo:main Feb 21, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants