@@ -88,7 +88,7 @@ def make_node(self, *inputs):
88
88
89
89
90
90
class MinimizeOp (ScipyWrapperOp ):
91
- __props__ = ("method" , "jac" , "hess" , "hessp" , "debug" )
91
+ __props__ = ("method" , "jac" , "hess" , "hessp" )
92
92
93
93
def __init__ (
94
94
self ,
@@ -100,7 +100,6 @@ def __init__(
100
100
hess : bool = False ,
101
101
hessp : bool = False ,
102
102
optimizer_kwargs : dict | None = None ,
103
- debug : bool = False ,
104
103
):
105
104
self .fgraph = FunctionGraph ([x , * args ], [objective ])
106
105
@@ -116,7 +115,6 @@ def __init__(
116
115
117
116
self .method = method
118
117
self .optimizer_kwargs = optimizer_kwargs if optimizer_kwargs is not None else {}
119
- self .debug = debug
120
118
self ._fn = None
121
119
self ._fn_wrapped = None
122
120
@@ -187,7 +185,6 @@ def minimize(
187
185
x : TensorVariable ,
188
186
method : str = "BFGS" ,
189
187
jac : bool = True ,
190
- debug : bool = False ,
191
188
optimizer_kwargs : dict | None = None ,
192
189
):
193
190
"""
@@ -209,9 +206,6 @@ def minimize(
209
206
Whether to compute and use the gradient of teh objective function with respect to x for optimization.
210
207
Default is True.
211
208
212
- debug : bool, optional
213
- If True, prints raw scipy result after optimization. Default is False.
214
-
215
209
optimizer_kwargs
216
210
Additional keyword arguments to pass to scipy.optimize.minimize
217
211
@@ -233,15 +227,14 @@ def minimize(
233
227
objective = objective ,
234
228
method = method ,
235
229
jac = jac ,
236
- debug = debug ,
237
230
optimizer_kwargs = optimizer_kwargs ,
238
231
)
239
232
240
233
return minimize_op (x , * args )
241
234
242
235
243
236
class RootOp (ScipyWrapperOp ):
244
- __props__ = ("method" , "jac" , "debug" )
237
+ __props__ = ("method" , "jac" )
245
238
246
239
def __init__ (
247
240
self ,
@@ -251,7 +244,6 @@ def __init__(
251
244
method : str = "hybr" ,
252
245
jac : bool = True ,
253
246
optimizer_kwargs : dict | None = None ,
254
- debug : bool = False ,
255
247
):
256
248
self .fgraph = FunctionGraph ([variables , * args ], [equations ])
257
249
@@ -263,7 +255,6 @@ def __init__(
263
255
264
256
self .method = method
265
257
self .optimizer_kwargs = optimizer_kwargs if optimizer_kwargs is not None else {}
266
- self .debug = debug
267
258
self ._fn = None
268
259
self ._fn_wrapped = None
269
260
@@ -312,7 +303,6 @@ def root(
312
303
variables : TensorVariable ,
313
304
method : str = "hybr" ,
314
305
jac : bool = True ,
315
- debug : bool = False ,
316
306
):
317
307
"""Find roots of a system of equations using scipy.optimize.root."""
318
308
@@ -322,9 +312,7 @@ def root(
322
312
if (arg is not variables and not isinstance (arg , Constant ))
323
313
]
324
314
325
- root_op = RootOp (
326
- variables , * args , equations = equations , method = method , jac = jac , debug = debug
327
- )
315
+ root_op = RootOp (variables , * args , equations = equations , method = method , jac = jac )
328
316
329
317
return root_op (variables , * args )
330
318
0 commit comments