Skip to content

Commit ea70537

Browse files
committed
Fixing failing tests issues
1 parent 1120b14 commit ea70537

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

doc/OnlineDocs/explanation/analysis/parmest/covariance.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ the :class:`~pyomo.contrib.parmest.parmest.Estimator.cov_est` function, e.g.,
106106
>>> import pyomo.contrib.parmest.parmest as parmest
107107
>>> pest = parmest.Estimator(exp_list, obj_function="SSE")
108108
>>> obj_val, theta_val = pest.theta_est()
109-
WARNING: DEPRECATED: ...
110109
>>> cov = pest.cov_est()
111110

112111
Optionally, one of the three methods; "reduced_hessian", "finite_difference",
@@ -118,6 +117,5 @@ e.g.,
118117

119118
>>> pest = parmest.Estimator(exp_list, obj_function="SSE")
120119
>>> obj_val, theta_val = pest.theta_est()
121-
WARNING: DEPRECATED: ...
122120
>>> cov_method = "reduced_hessian"
123121
>>> cov = pest.cov_est(method=cov_method)

doc/OnlineDocs/explanation/analysis/parmest/datarec.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,4 @@ The following example returns model values from a Pyomo Expression.
5151

5252
>>> pest = parmest.Estimator(exp_list, obj_function=SSE, solver_options=None)
5353
>>> obj, theta, var_values = pest.theta_est(return_values=['response_function'])
54-
WARNING: DEPRECATED: ...
5554
>>> #print(var_values)

pyomo/contrib/parmest/parmest.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -985,19 +985,6 @@ def _Q_opt(
985985
values as well as the objective function value.
986986
987987
"""
988-
if calc_cov is not NOTSET:
989-
deprecation_warning(
990-
"theta_est_leaveNout(): `calc_cov` and `cov_n` are deprecated options and "
991-
"will be removed in the future. Please use the `cov_est()` function "
992-
"for covariance calculation.",
993-
version="6.9.4.dev0",
994-
)
995-
else:
996-
calc_cov = False
997-
998-
if cov_n is NOTSET:
999-
cov_n = 0
1000-
1001988
if solver == "k_aug":
1002989
raise RuntimeError("k_aug no longer supported.")
1003990

@@ -1093,7 +1080,8 @@ def _Q_opt(
10931080

10941081
if not isinstance(cov_n, int):
10951082
raise TypeError(
1096-
f"Expected an integer for the 'cov_n' argument. Got {type(cov_n)}."
1083+
f"Expected an integer for the 'cov_n' argument. "
1084+
f"Got {type(cov_n)}."
10971085
)
10981086
num_unknowns = max(
10991087
[
@@ -1662,6 +1650,7 @@ def theta_est(
16621650
"""
16631651
assert isinstance(solver, str)
16641652
assert isinstance(return_values, list)
1653+
assert (calc_cov is NOTSET) or isinstance(calc_cov, bool)
16651654

16661655
if calc_cov is not NOTSET:
16671656
deprecation_warning(
@@ -1673,9 +1662,6 @@ def theta_est(
16731662
else:
16741663
calc_cov = False
16751664

1676-
if cov_n is NOTSET:
1677-
cov_n = 0
1678-
16791665
# check if we are using deprecated parmest
16801666
if self.pest_deprecated is not None and calc_cov:
16811667
return self.pest_deprecated.theta_est(

0 commit comments

Comments
 (0)