From addef45696ea31e72c5a9d661593b3e9eda0d000 Mon Sep 17 00:00:00 2001 From: BulatVakhitov Date: Mon, 22 Jul 2024 12:48:23 +0000 Subject: [PATCH] paraphrase error message --- batchflow/models/torch/base_batchsize_mixin.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/batchflow/models/torch/base_batchsize_mixin.py b/batchflow/models/torch/base_batchsize_mixin.py index 1ae77eef0..156ddc480 100644 --- a/batchflow/models/torch/base_batchsize_mixin.py +++ b/batchflow/models/torch/base_batchsize_mixin.py @@ -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'}])