From d3a418013a6040ec286a8df88450088af5ccac86 Mon Sep 17 00:00:00 2001 From: Jiatong <728307998@qq.com> Date: Mon, 26 Aug 2024 17:50:52 -0400 Subject: [PATCH 1/4] Fix issue for py3.11 --- fairseq/dataclass/configs.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/fairseq/dataclass/configs.py b/fairseq/dataclass/configs.py index 3f3ea69..9a5d6af 100644 --- a/fairseq/dataclass/configs.py +++ b/fairseq/dataclass/configs.py @@ -1126,16 +1126,16 @@ class EMAConfig(FairseqDataclass): @dataclass class FairseqConfig(FairseqDataclass): - common: CommonConfig = CommonConfig() - common_eval: CommonEvalConfig = CommonEvalConfig() - distributed_training: DistributedTrainingConfig = DistributedTrainingConfig() - dataset: DatasetConfig = DatasetConfig() - optimization: OptimizationConfig = OptimizationConfig() - checkpoint: CheckpointConfig = CheckpointConfig() - bmuf: FairseqBMUFConfig = FairseqBMUFConfig() - generation: GenerationConfig = GenerationConfig() - eval_lm: EvalLMConfig = EvalLMConfig() - interactive: InteractiveConfig = InteractiveConfig() + common: CommonConfig = field(default_factory=CommonConfig) + common_eval: CommonEvalConfig = field(default_factory=CommonEvalConfig) + distributed_training: DistributedTrainingConfig = field(default_factory=DistributedTrainingConfig) + dataset: DatasetConfig = field(default_factory=DatasetConfig) + optimization: OptimizationConfig = field(default_factory=OptimizationConfig) + checkpoint: CheckpointConfig = field(default_factory=CheckpointConfig) + bmuf: FairseqBMUFConfig = field(default_factory=FairseqBMUFConfig) + generation: GenerationConfig = field(default_factory=GenerationConfig) + eval_lm: EvalLMConfig = field(default_factory=EvalLMConfig) + interactive: InteractiveConfig = field(default_factory=InteractiveConfig) model: Any = MISSING task: Any = None criterion: Any = None @@ -1144,4 +1144,4 @@ class FairseqConfig(FairseqDataclass): scoring: Any = None bpe: Any = None tokenizer: Any = None - ema: EMAConfig = EMAConfig() + ema: EMAConfig = field(default_factory=EMAConfig From eab1ae6cfe5e7d61cbc31b4cbe98044484a00cab Mon Sep 17 00:00:00 2001 From: Jiatong <728307998@qq.com> Date: Mon, 26 Aug 2024 17:53:23 -0400 Subject: [PATCH 2/4] fix ci black --- fairseq/dataclass/configs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fairseq/dataclass/configs.py b/fairseq/dataclass/configs.py index 9a5d6af..3d91466 100644 --- a/fairseq/dataclass/configs.py +++ b/fairseq/dataclass/configs.py @@ -1128,7 +1128,9 @@ class EMAConfig(FairseqDataclass): class FairseqConfig(FairseqDataclass): common: CommonConfig = field(default_factory=CommonConfig) common_eval: CommonEvalConfig = field(default_factory=CommonEvalConfig) - distributed_training: DistributedTrainingConfig = field(default_factory=DistributedTrainingConfig) + distributed_training: DistributedTrainingConfig = field( + default_factory=DistributedTrainingConfig + ) dataset: DatasetConfig = field(default_factory=DatasetConfig) optimization: OptimizationConfig = field(default_factory=OptimizationConfig) checkpoint: CheckpointConfig = field(default_factory=CheckpointConfig) From 754770d21728d189fab3654824aa89b102cf6426 Mon Sep 17 00:00:00 2001 From: Jiatong <728307998@qq.com> Date: Mon, 26 Aug 2024 17:58:43 -0400 Subject: [PATCH 3/4] Update configs.py --- fairseq/dataclass/configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fairseq/dataclass/configs.py b/fairseq/dataclass/configs.py index 3d91466..68dbb50 100644 --- a/fairseq/dataclass/configs.py +++ b/fairseq/dataclass/configs.py @@ -1129,7 +1129,7 @@ class FairseqConfig(FairseqDataclass): common: CommonConfig = field(default_factory=CommonConfig) common_eval: CommonEvalConfig = field(default_factory=CommonEvalConfig) distributed_training: DistributedTrainingConfig = field( - default_factory=DistributedTrainingConfig + default_factory=DistributedTrainingConfig, ) dataset: DatasetConfig = field(default_factory=DatasetConfig) optimization: OptimizationConfig = field(default_factory=OptimizationConfig) From b271ad1b325c1c38d174fb4697e0dacebae74ec5 Mon Sep 17 00:00:00 2001 From: Jiatong <728307998@qq.com> Date: Mon, 26 Aug 2024 17:59:27 -0400 Subject: [PATCH 4/4] Update configs.py --- fairseq/dataclass/configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fairseq/dataclass/configs.py b/fairseq/dataclass/configs.py index 68dbb50..12c0dba 100644 --- a/fairseq/dataclass/configs.py +++ b/fairseq/dataclass/configs.py @@ -1146,4 +1146,4 @@ class FairseqConfig(FairseqDataclass): scoring: Any = None bpe: Any = None tokenizer: Any = None - ema: EMAConfig = field(default_factory=EMAConfig + ema: EMAConfig = field(default_factory=EMAConfig)