Skip to content

Commit

Permalink
Update src/orquestra/opt/optimizers/tensor_train_optimizer.py
Browse files Browse the repository at this point in the history
Co-authored-by: Athena Caesura <athena.caesura@zapatacomputing.com>
  • Loading branch information
VolodyaCO and Athena Caesura committed May 1, 2023
1 parent 8796e9c commit 2796ee9
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/orquestra/opt/optimizers/tensor_train_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,18 +124,18 @@ def __call__(self, parameters: np.ndarray) -> float:
self.candidates[i]["bounds"] = _get_tighter_bounds(
parameters, self.bounds
)
break
self.candidates.insert(
i,
{
"cost": cost,
"parameters": parameters,
"bounds": _get_tighter_bounds(parameters, self.bounds),
},
)
self.candidates.pop()
self.candidates_hashes.insert(i, parameters_hash)
self.candidates_hashes.pop()
else:
self.candidates.insert(
i,
{
"cost": cost,
"parameters": parameters,
"bounds": _get_tighter_bounds(parameters, self.bounds),
},
)
self.candidates.pop()
self.candidates_hashes.insert(i, parameters_hash)
self.candidates_hashes.pop()
break
return cost
candidate = self.candidates[self.candidate_index]
Expand Down

0 comments on commit 2796ee9

Please sign in to comment.