Skip to content

Commit 4da0fb2

Browse files
committed
disable=too-many-arguments in optimizers
1 parent 286e775 commit 4da0fb2

File tree

1 file changed

+5
-5
lines changed
  • qiskit_machine_learning/optimizers

1 file changed

+5
-5
lines changed

qiskit_machine_learning/optimizers/spsa.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ def __call__(self, nfev, parameters, value, stepsize, accepted) -> bool:
161161
162162
"""
163163

164-
# pylint: disable=too-many-arguments
165-
def __init__(
164+
165+
def __init__( # pylint: disable=too-many-arguments
166166
self,
167167
maxiter: int = 100,
168168
blocking: bool = False,
@@ -282,7 +282,7 @@ def __init__(
282282
self._smoothed_hessian: np.ndarray | None = None # smoothed average of the Hessians
283283

284284
@staticmethod
285-
def calibrate(
285+
def calibrate( # pylint: disable=too-many-arguments
286286
loss: Callable[[np.ndarray], float],
287287
initial_point: np.ndarray,
288288
c: float = 0.2,
@@ -414,7 +414,7 @@ def settings(self) -> dict[str, Any]:
414414
"termination_checker": self.termination_checker,
415415
}
416416

417-
def _point_sample(self, loss, x, eps, delta1, delta2):
417+
def _point_sample(self, loss, x, eps, delta1, delta2): # pylint: disable=too-many-arguments
418418
"""A single sample of the gradient at position ``x`` in direction ``delta``."""
419419
# points to evaluate
420420
points = [x + eps * delta1, x - eps * delta1]
@@ -479,7 +479,7 @@ def _point_estimate(self, loss, x, eps, num_samples):
479479
hessian_estimate / num_samples,
480480
)
481481

482-
def _compute_update(self, loss, x, k, eps, lse_solver):
482+
def _compute_update(self, loss, x, k, eps, lse_solver): # pylint: disable=too-many-arguments
483483
# compute the perturbations
484484
if isinstance(self.resamplings, dict):
485485
num_samples = self.resamplings.get(k, 1)

0 commit comments

Comments
 (0)