From 72c69a320022e8832c37a6deb99dc0e5eef34adb Mon Sep 17 00:00:00 2001 From: guojihu-hana Date: Tue, 30 Jul 2024 15:06:24 +0800 Subject: [PATCH] Modify files with lint-check --- examples/DiscoResearch/mixtral_7b_8expert/train.py | 10 +++++++--- examples/Qwen/Qwen2_7B/train.py | 4 ++-- examples/baichuan_inc/Baichuan2_7B_Base/train.py | 10 +++++++--- examples/deepseek_ai/DeepSeek_V2/train.py | 10 +++++++--- examples/internlm/internlm2_7b/train.py | 10 +++++++--- examples/internlm/internlm_7b/train.py | 4 ++-- examples/microsoft/Phi_3_mini_4k_instruct/train.py | 10 +++++++--- examples/yi/yi_6B/train.py | 4 ++-- 8 files changed, 41 insertions(+), 21 deletions(-) diff --git a/examples/DiscoResearch/mixtral_7b_8expert/train.py b/examples/DiscoResearch/mixtral_7b_8expert/train.py index 8411f19..b6e1c77 100644 --- a/examples/DiscoResearch/mixtral_7b_8expert/train.py +++ b/examples/DiscoResearch/mixtral_7b_8expert/train.py @@ -8,13 +8,17 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.DiscoResearch.mixtral_7b_8expert.modeling_moe_mistral import MixtralForCausalLM -from huggingface_model.DiscoResearch.mixtral_7b_8expert.configuration_moe_mistral import MixtralConfig +from huggingface_model.DiscoResearch.mixtral_7b_8expert.configuration_moe_mistral import ( + MixtralConfig, +) +from huggingface_model.DiscoResearch.mixtral_7b_8expert.modeling_moe_mistral import ( + MixtralForCausalLM, +) @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/Qwen/Qwen2_7B/train.py b/examples/Qwen/Qwen2_7B/train.py index 2645e00..20e4c61 100644 --- a/examples/Qwen/Qwen2_7B/train.py +++ b/examples/Qwen/Qwen2_7B/train.py @@ -8,13 +8,13 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.Qwen.Qwen2_7B.modeling_qwen2 import Qwen2ForCausalLM from huggingface_model.Qwen.Qwen2_7B.configuration_qwen2 import Qwen2Config +from huggingface_model.Qwen.Qwen2_7B.modeling_qwen2 import Qwen2ForCausalLM @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/baichuan_inc/Baichuan2_7B_Base/train.py b/examples/baichuan_inc/Baichuan2_7B_Base/train.py index fde8ed7..22ccda0 100644 --- a/examples/baichuan_inc/Baichuan2_7B_Base/train.py +++ b/examples/baichuan_inc/Baichuan2_7B_Base/train.py @@ -8,13 +8,17 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.baichuan_inc.Baichuan2_7B_Base.modeling_baichuan import BaichuanForCausalLM -from huggingface_model.baichuan_inc.Baichuan2_7B_Base.configuration_baichuan import BaichuanConfig +from huggingface_model.baichuan_inc.Baichuan2_7B_Base.configuration_baichuan import ( + BaichuanConfig, +) +from huggingface_model.baichuan_inc.Baichuan2_7B_Base.modeling_baichuan import ( + BaichuanForCausalLM, +) @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/deepseek_ai/DeepSeek_V2/train.py b/examples/deepseek_ai/DeepSeek_V2/train.py index 32a5d4b..26f7b01 100644 --- a/examples/deepseek_ai/DeepSeek_V2/train.py +++ b/examples/deepseek_ai/DeepSeek_V2/train.py @@ -8,13 +8,17 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.deepseek_ai.DeepSeek_V2.modeling_deepseek import DeepseekV2ForCausalLM -from huggingface_model.deepseek_ai.DeepSeek_V2.configuration_deepseek import DeepseekV2Config +from huggingface_model.deepseek_ai.DeepSeek_V2.configuration_deepseek import ( + DeepseekV2Config, +) +from huggingface_model.deepseek_ai.DeepSeek_V2.modeling_deepseek import ( + DeepseekV2ForCausalLM, +) @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/internlm/internlm2_7b/train.py b/examples/internlm/internlm2_7b/train.py index a7f9540..7478716 100644 --- a/examples/internlm/internlm2_7b/train.py +++ b/examples/internlm/internlm2_7b/train.py @@ -8,13 +8,17 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.internlm.internlm2_7b.modeling_internlm2 import InternLM2ForCausalLM -from huggingface_model.internlm.internlm2_7b.configuration_internlm2 import InternLM2Config +from huggingface_model.internlm.internlm2_7b.configuration_internlm2 import ( + InternLM2Config, +) +from huggingface_model.internlm.internlm2_7b.modeling_internlm2 import ( + InternLM2ForCausalLM, +) @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/internlm/internlm_7b/train.py b/examples/internlm/internlm_7b/train.py index 575042b..9611d79 100644 --- a/examples/internlm/internlm_7b/train.py +++ b/examples/internlm/internlm_7b/train.py @@ -8,13 +8,13 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.internlm.internlm_7b.modeling_internlm import InternLMForCausalLM from huggingface_model.internlm.internlm_7b.configuration_internlm import InternLMConfig +from huggingface_model.internlm.internlm_7b.modeling_internlm import InternLMForCausalLM @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/microsoft/Phi_3_mini_4k_instruct/train.py b/examples/microsoft/Phi_3_mini_4k_instruct/train.py index 08e7648..ddc2965 100644 --- a/examples/microsoft/Phi_3_mini_4k_instruct/train.py +++ b/examples/microsoft/Phi_3_mini_4k_instruct/train.py @@ -8,13 +8,17 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.microsoft.Phi_3_mini_4k_instruct.modeling_phi3 import Phi3ForCausalLM -from huggingface_model.microsoft.Phi_3_mini_4k_instruct.configuration_phi3 import Phi3Config +from huggingface_model.microsoft.Phi_3_mini_4k_instruct.configuration_phi3 import ( + Phi3Config, +) +from huggingface_model.microsoft.Phi_3_mini_4k_instruct.modeling_phi3 import ( + Phi3ForCausalLM, +) @internevo_monitor(feishu_alert=True, clean_run=True) diff --git a/examples/yi/yi_6B/train.py b/examples/yi/yi_6B/train.py index 40ce4da..88d7c6d 100644 --- a/examples/yi/yi_6B/train.py +++ b/examples/yi/yi_6B/train.py @@ -8,13 +8,13 @@ build_valid_loader_with_data_type, ) from internlm.initialize import initialize_distributed_env +from internlm.model.registry import hf_config_initializer, model_initializer from internlm.monitor import internevo_monitor from internlm.train import initialize_model from internlm.utils.common import parse_args -from internlm.model.registry import model_initializer, hf_config_initializer -from huggingface_model.yi.yi_6B.modeling_yi import YiForCausalLM from huggingface_model.yi.yi_6B.configuration_yi import YiConfig +from huggingface_model.yi.yi_6B.modeling_yi import YiForCausalLM @internevo_monitor(feishu_alert=True, clean_run=True)