Skip to content

Commit

Permalink
paraphrase error message
Browse files Browse the repository at this point in the history
  • Loading branch information
BulatVakhitov committed Jul 22, 2024
1 parent 98bd880 commit addef45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions batchflow/models/torch/base_batchsize_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,11 @@ def _compute_optimal_batch_size(self, inputs=None, targets=None, low=2, high=Non
if update_method == 'binary':
n_iters = int(np.ceil(np.log2(high - low)))
generator = self._binary_batch_size_generator(low=low, high=high, max_memory=max_memory)

elif update_method == 'bruteforce':
n_iters = None
generator = self._bruteforce_batch_size_generator(factor=factor, max_memory=max_memory)
else:
raise ValueError("Wrong update method! Could be `bruteforce` or `binary`")
raise ValueError(f"Unknown `update_method`: select either `'bruteforce'` or `'binary'`.")

notifier = Notifier(n_iters=n_iters, bar=pbar,
monitors=[{'source': batch_size_history, 'name': 'batch_size'}])
Expand Down

0 comments on commit addef45

Please sign in to comment.