Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/test_branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ jobs:
- os: ubuntu-latest
python: '3.10'
other: /slim
slim: 1
slim: 2
TARGET: linux
PYENV: pip


steps:
- name: Checkout Pyomo source
uses: actions/checkout@v6
Expand All @@ -168,7 +169,7 @@ jobs:
echo "GHA_JOBGROUP=other" >> $GITHUB_ENV
fi
EXTRAS=tests
if test -z "${{matrix.slim}}"; then
if test -z "${{matrix.slim}}" -o "${{matrix.slim}}" = 1; then
EXTRAS="$EXTRAS,docs,optional"
fi
echo "EXTRAS=$EXTRAS" >> $GITHUB_ENV
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test_pr_and_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ jobs:
- os: ubuntu-latest
python: '3.10'
other: /slim
slim: 2
TARGET: linux
PYENV: pip

- os: ubuntu-latest
python: 3.13
other: /nosolvers
slim: 1
TARGET: linux
PYENV: pip
Expand Down Expand Up @@ -215,7 +222,7 @@ jobs:
echo "GHA_JOBGROUP=other" >> $GITHUB_ENV
fi
EXTRAS=tests
if test -z "${{matrix.slim}}"; then
if test -z "${{matrix.slim}}" -o "${{matrix.slim}}" = 1; then
EXTRAS="$EXTRAS,docs,optional"
fi
echo "EXTRAS=$EXTRAS" >> $GITHUB_ENV
Expand Down
4 changes: 4 additions & 0 deletions pyomo/contrib/parmest/tests/test_parmest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@ def test_l2_objective_value_matches_manual_quadratic(self):

self.assertAlmostEqual(pyo.value(expr), expected)

@unittest.skipUnless(ipopt_available, "Test requires ipopt")
def test_l2_penalty_not_double_counted_across_scenarios(self):
# Confirms regularization is applied once at the estimator level,
# not once per scenario.
Expand Down Expand Up @@ -1591,6 +1592,7 @@ def test_user_specified_unsupported_regularization_raises(self):
exp_list, obj_function="SSE", regularization=lambda m: m.theta0**2
)

@unittest.skipUnless(ipopt_available, "Test requires ipopt")
def test_l2_lambda_zero_matches_unregularized_objective(self):
exp_list = [self.LinearExperiment(1.0, 1.0), self.LinearExperiment(2.0, 2.0)]
prior_fim = pd.DataFrame(
Expand All @@ -1615,6 +1617,7 @@ def test_l2_lambda_zero_matches_unregularized_objective(self):
obj_l2_zero = self._obj_at_theta(pest_l2_zero, theta0, theta1)
self.assertAlmostEqual(obj_l2_zero, obj_base)

@unittest.skipUnless(ipopt_available, "Test requires ipopt")
def test_prior_subset_penalizes_only_selected_parameter(self):
# Prior indexed only by theta1 should leave theta0 unpenalized.
exp_list = [self.LinearExperiment(1.0, 1.0)]
Expand Down Expand Up @@ -1976,6 +1979,7 @@ def test_l2_weighted_objective_applies_half_regularization_factor(self):

self.assertAlmostEqual(pyo.value(expr), expected)

@unittest.skipUnless(ipopt_available, "Test requires ipopt")
def test_indexed_unknown_parameters_regularization_uses_scalar_theta_names(self):
exp_list = [IndexedThetaExperiment(2.0, 5.0)]
prior_fim = pd.DataFrame(
Expand Down
Loading