Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

super().__init__() call should use keyword arguments #5

Open
bauwenst opened this issue Dec 1, 2024 · 0 comments · May be fixed by #6
Open

super().__init__() call should use keyword arguments #5

bauwenst opened this issue Dec 1, 2024 · 0 comments · May be fixed by #6

Comments

@bauwenst
Copy link

bauwenst commented Dec 1, 2024

The library is broken in the most recent version of transformers because the HfMultiTaskTrainer class doesn't use keyword arguments to call super().__init__(), which means that when HuggingFace adds a constructor argument (which they have done), the values get passed to the wrong argument.

super().__init__(
model, args, data_collator, train_dataset, eval_dataset, tokenizer,
model_init, compute_metrics, callbacks, optimizers,
preprocess_logits_for_metrics
)

It should be something like

super().__init__( 
    model=model, 
    args=args, 
    data_collator=data_collator, 
    train_dataset=train_dataset, 
    eval_dataset=eval_dataset, 
    tokenizer=tokenizer, 
    model_init=model_init, 
    compute_metrics=compute_metrics, 
    callbacks=callbacks, 
    optimizers=optimizers, 
    preprocess_logits_for_metrics=preprocess_logits_for_metrics  
)
@bauwenst bauwenst linked a pull request Dec 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant