Skip to content

Commit

Permalink
Merge pull request #6 from ftshijt/patch-1
Browse files Browse the repository at this point in the history
Fix issue for py3.11
  • Loading branch information
Fhrozen authored Aug 26, 2024
2 parents 7e276ba + b271ad1 commit 204e7ab
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions fairseq/dataclass/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1126,16 +1126,18 @@ 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
Expand All @@ -1144,4 +1146,4 @@ class FairseqConfig(FairseqDataclass):
scoring: Any = None
bpe: Any = None
tokenizer: Any = None
ema: EMAConfig = EMAConfig()
ema: EMAConfig = field(default_factory=EMAConfig)

0 comments on commit 204e7ab

Please sign in to comment.