From cd4e473ee613a3c5d0b70769c5ec19a7fc8a453b Mon Sep 17 00:00:00 2001 From: digger yu Date: Fri, 2 Jun 2023 08:47:14 +0800 Subject: [PATCH] fix typo with deepspeed/ (#3547) * fix spelling error with deepspeed/runtime/ * fix typo docs/ * fix typo in comments with deepspeed/ * fix typo deepspeed/ * Update constants.py Remove the space after nebula --------- Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com> Co-authored-by: Michael Wyatt --- deepspeed/autotuning/autotuner.py | 2 +- deepspeed/compression/compress.py | 4 ++-- deepspeed/nebula/constants.py | 4 ++-- deepspeed/runtime/checkpoint_engine/README.md | 2 +- deepspeed/runtime/checkpoint_engine/checkpoint_engine.py | 2 +- deepspeed/runtime/engine.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deepspeed/autotuning/autotuner.py b/deepspeed/autotuning/autotuner.py index 73825a69..4ea71d31 100755 --- a/deepspeed/autotuning/autotuner.py +++ b/deepspeed/autotuning/autotuner.py @@ -637,7 +637,7 @@ class Autotuner: logger.info(f"End tuning for space: {tuning_space_name}") return max_micro_batch_size, best_mbs, best_metric_val - def get_plauteu_mbs(self, tuning_space_name): + def get_plateau_mbs(self, tuning_space_name): if tuning_space_name not in self.records: return 0 space_records = self.records[tuning_space_name] diff --git a/deepspeed/compression/compress.py b/deepspeed/compression/compress.py index 951ef1bb..2f0e88be 100644 --- a/deepspeed/compression/compress.py +++ b/deepspeed/compression/compress.py @@ -213,14 +213,14 @@ def student_initialization(student_model, teacher_model, deepspeed_config): Example 1: bert.encoder.layer, for BERT_base model's prefix name Example 2: transformer.h, for GPT-2 hugging face prefix name teacher_layer (`list of integers`) - The layer of teacher will be used for student's reinitializedion + The layer of teacher will be used for student's reinitialization Example 1: [1,3,5,7,9], means we want to matches the 2nd/4th/6th/8th/10th layer of teacher to the first 5 layers of student student_layer (`list` or None) The layer of student need to be re-initialized Example 1: None, means we want to reinitialize all the layers Example 1: [0,1,2,3,4], means we want to reinitialize the first 5 layers other_module_name (`list of string`) - The modules will be used for student's reinitializedion + The modules will be used for student's reinitialization Example 1: ['bert.pooler', 'bert.embeddings', 'classifier'], means we want to apply the weight in teacher's embedding/pooler/classier module to the student Example 2: ['transformer.w', 'transformer.ln_f', 'lm_head'], means we want to apply the weight in teacher's embedding layers module to the student Note that teacher_layer should matches student layer diff --git a/deepspeed/nebula/constants.py b/deepspeed/nebula/constants.py index 2bfcef77..9fa5769b 100644 --- a/deepspeed/nebula/constants.py +++ b/deepspeed/nebula/constants.py @@ -29,8 +29,8 @@ NEBULA_ENABLED_DEFAULT = False # There is a case where customer want to load the checkpoint saved # by raw torch. Because nebula cannot load torch checkpoint directly # as they have different folder structures to bring the gap for -# loading(the data are totally same in bytes for torch and nebula s -# aving). +# loading(the data are totally same in bytes for torch and nebula +# saving). # In this case, we must disable nebula load to use raw torch load. # Customer can just set NEBULA_ENABLE_NEBULA_LOAD to False. Then use # original way of deepspeed to load, i.e. set the value of "--load". diff --git a/deepspeed/runtime/checkpoint_engine/README.md b/deepspeed/runtime/checkpoint_engine/README.md index a19f5488..c2b7940a 100644 --- a/deepspeed/runtime/checkpoint_engine/README.md +++ b/deepspeed/runtime/checkpoint_engine/README.md @@ -31,7 +31,7 @@ class CheckpointEngine(object): pass def commit(self, tag): - # to tell checkpoint services if all files are readys. + # to tell checkpoint services if all files are ready. pass ``` diff --git a/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py b/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py index 3f8978df..a341dffd 100644 --- a/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py +++ b/deepspeed/runtime/checkpoint_engine/checkpoint_engine.py @@ -26,5 +26,5 @@ class CheckpointEngine(object): pass def commit(self, tag): - # to tell checkpoint services if all files are readys. + # to tell checkpoint services if all files are ready. pass diff --git a/deepspeed/runtime/engine.py b/deepspeed/runtime/engine.py index 93ab0bde..b6389697 100644 --- a/deepspeed/runtime/engine.py +++ b/deepspeed/runtime/engine.py @@ -1916,7 +1916,7 @@ class DeepSpeedEngine(Module): """ Manually overrides the DeepSpeed engine's gradient accumulation boundary state, this is an optional feature and should be used with care. The state should be set before to the intended - value before each forward/backward. The final fordward/backward should have the + value before each forward/backward. The final forward/backward should have the boundary state set to True. This style allows client code to only call engine.step() once after all the gradient accumulation passes are complete. See example below: .. code-block:: python -- GitLab