From f1c8542ff7ddf6f2597b14aed5f947aa62aa9a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20Gallou=C3=A9dec?= <45557362+qgallouedec@users.noreply.github.com> Date: Mon, 12 Aug 2024 21:20:17 +0200 Subject: [PATCH] "to be not" -> "not to be" (#32636) * "to be not" -> "not to be" * Update sam.md * Update trainer.py * Update modeling_utils.py * Update test_modeling_utils.py * Update test_modeling_utils.py --- docs/source/en/model_doc/sam.md | 2 +- src/transformers/modeling_utils.py | 2 +- src/transformers/trainer.py | 2 +- tests/models/bloom/test_modeling_bloom.py | 2 +- tests/utils/test_modeling_utils.py | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/source/en/model_doc/sam.md b/docs/source/en/model_doc/sam.md index 12a87eb5bc..9a16e6255a 100644 --- a/docs/source/en/model_doc/sam.md +++ b/docs/source/en/model_doc/sam.md @@ -34,7 +34,7 @@ Tips: - The model predicts much better results if input 2D points and/or input bounding boxes are provided - You can prompt multiple points for the same image, and predict a single mask. - Fine-tuning the model is not supported yet -- According to the paper, textual input should be also supported. However, at this time of writing this seems to be not supported according to [the official repository](https://github.com/facebookresearch/segment-anything/issues/4#issuecomment-1497626844). +- According to the paper, textual input should be also supported. However, at this time of writing this seems not to be supported according to [the official repository](https://github.com/facebookresearch/segment-anything/issues/4#issuecomment-1497626844). This model was contributed by [ybelkada](https://huggingface.co/ybelkada) and [ArthurZ](https://huggingface.co/ArthurZ). diff --git a/src/transformers/modeling_utils.py b/src/transformers/modeling_utils.py index 9a050c246e..679125f73a 100755 --- a/src/transformers/modeling_utils.py +++ b/src/transformers/modeling_utils.py @@ -3034,7 +3034,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix > Parameters for big model inference low_cpu_mem_usage(`bool`, *optional*): - Tries to not use more than 1x model size in CPU memory (including peak memory) while loading the model. + Tries not to use more than 1x model size in CPU memory (including peak memory) while loading the model. Generally should be combined with a `device_map` (such as `"auto"`) for best results. This is an experimental feature and a subject to change at any moment. diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index 85d31be09a..e74b463e8d 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -2373,7 +2373,7 @@ class Trainer: break if step < 0: logger.warning( - "There seems to be not a single sample in your epoch_iterator, stopping training at step" + "There seems not to be a single sample in your epoch_iterator, stopping training at step" f" {self.state.global_step}! This is expected if you're using an IterableDataset and set" f" num_steps ({max_steps}) higher than the number of available samples." ) diff --git a/tests/models/bloom/test_modeling_bloom.py b/tests/models/bloom/test_modeling_bloom.py index 0952cfee3b..c1cd7c2a27 100644 --- a/tests/models/bloom/test_modeling_bloom.py +++ b/tests/models/bloom/test_modeling_bloom.py @@ -344,7 +344,7 @@ class BloomModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixi fx_compatible = True test_missing_keys = False test_pruning = False - test_torchscript = True # torch.autograd functions seems to be not supported + test_torchscript = True # torch.autograd functions seems not to be supported def setUp(self): self.model_tester = BloomModelTester(self) diff --git a/tests/utils/test_modeling_utils.py b/tests/utils/test_modeling_utils.py index 71c72f9212..2db96d87c7 100644 --- a/tests/utils/test_modeling_utils.py +++ b/tests/utils/test_modeling_utils.py @@ -2428,7 +2428,7 @@ class TestAttentionImplementation(unittest.TestCase): "hf-internal-testing/tiny-random-GPTBigCodeModel", attn_implementation="flash_attention_2" ) - self.assertTrue("the package flash_attn seems to be not installed" in str(cm.exception)) + self.assertTrue("the package flash_attn seems not to be installed" in str(cm.exception)) def test_not_available_flash_with_config(self): if is_flash_attn_2_available(): @@ -2443,7 +2443,7 @@ class TestAttentionImplementation(unittest.TestCase): attn_implementation="flash_attention_2", ) - self.assertTrue("the package flash_attn seems to be not installed" in str(cm.exception)) + self.assertTrue("the package flash_attn seems not to be installed" in str(cm.exception)) def test_not_available_sdpa(self): if is_torch_sdpa_available():