I tried to train the "facebook/wav2vec2-large-xlsr-53" model in huggingface to my custom dataset.

training_args = TrainingArguments(
    learning_rate=3e-4,
    max_steps=10000,
    eval_steps=100,
    per_device_train_batch_size=8,
    per_device_eval_batch_size=8,
)
model_args = ModelArguments(
    activation_dropout=0.2,
    hidden_dropout=0.2,
)
output_dir = r'Output'
model.finetune(
    output_dir,
    train_data=train_data,
    token_set=token_set,
    training_args=training_args,
    model_args=model_args,
)

INFO:huggingsound.trainer:Building trainer... INFO:huggingsound.trainer:Starting training...

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ in <cell line: 3>:3 │ │ │ │ /usr/local/lib/python3.10/dist-packages/huggingsound/speech_recognition/model.py:361 in finetune │ │ │ │ 358 │ │ │ │ 359 │ │ logger.info("Starting fine-tuning process...") │ │ 360 │ │ │ │ ❱ 361 │ │ finetune_ctc(self.model_path, output_dir, processor, train_dataset, eval_dataset │ │ 362 │ │ │ │ 363 │ │ logger.info("Loading fine-tuned model...") │ │ 364 │ │ │ │ /usr/local/lib/python3.10/dist-packages/huggingsound/trainer.py:671 in finetune_ctc │ │ │ │ 668 │ if is_main_process(hftraining_args.local_rank): │ │ 669 │ │ processor.save_pretrained(hftraining_args.output_dir) │ │ 670 │ │ │ ❱ 671 │ train_result = trainer.train(resume_from_checkpoint=checkpoint) │ │ 672 │ trainer.save_model() │ │ 673 │ │ │ 674 │ metrics = train_result.metrics │ │ │ │ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1645 in train │ │ │ │ 1642 │ │ inner_training_loop = find_executable_batch_size( │ │ 1643 │ │ │ self._inner_training_loop, self._train_batch_size, args.auto_find_batch_size │ │ 1644 │ │ ) │ │ ❱ 1645 │ │ return inner_training_loop( │ │ 1646 │ │ │ args=args, │ │ 1647 │ │ │ resume_from_checkpoint=resume_from_checkpoint, │ │ 1648 │ │ │ trial=trial, │ │ │ │ /usr/local/lib/python3.10/dist-packages/transformers/trainer.py:1938 in _inner_training_loop │ │ │ │ 1935 │ │ │ │ │ self.control = self.callback_handler.on_step_begin(args, self.state, │ │ 1936 │ │ │ │ │ │ 1937 │ │ │ │ with self.accelerator.accumulate(model): │ │ ❱ 1938 │ │ │ │ │ tr_loss_step = self.training_step(model, inputs) │ │ 1939 │ │ │ │ │ │ 1940 │ │ │ │ if ( │ │ 1941 │ │ │ │ │ args.logging_nan_inf_filter │ │ │ │ /usr/local/lib/python3.10/dist-packages/huggingsound/trainer.py:453 in training_step │ │ │ │ 450 │ │ │ │ 451 │ │ if (hasattr(self, 'use_amp') and self.use_amp) or (hasattr(self, 'use_cuda_amp') │ │ 452 │ │ │ self.scaler.scale(loss).backward() │ │ ❱ 453 │ │ elif self.deepspeed: │ │ 454 │ │ │ self.deepspeed.backward(loss) │ │ 455 │ │ else: │ │ 456 │ │ │ loss.backward() │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'CTCTrainer' object has no attribute 'deepspeed'

How can I bypass this error and continue the training process?

0

There are 0 best solutions below