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

Fix ORT Trainer #2123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix ORT Trainer #2123

wants to merge 2 commits into from

Conversation

IlyasMoutawwakil
Copy link
Member

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@IlyasMoutawwakil
Copy link
Member Author

Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @IlyasMoutawwakil ! Not sure if we should deprecate the ORTTrainer at some point as usage seems low, also cc @JingyaHuang to have her opinion on this

@@ -818,7 +821,7 @@ def get_dataloader_sampler(dataloader):
self.control.should_training_stop = True

self.control = self.callback_handler.on_epoch_end(args, self.state, self.control)
self._maybe_log_save_evaluate(tr_loss, grad_norm, model, trial, epoch, ignore_keys_for_eval)
self._maybe_log_save_evaluate(tr_loss, grad_norm, model, trial, epoch, ignore_keys_for_eval, start_time)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start_time was introduced in transformers v4.47 https://github.com/huggingface/transformers/blob/v4.47.0/src/transformers/trainer.py#L3021 so maybe we should add a check for the transformers version (min / max supported version) + tests to make sure we keep compatibility with the min/max versions, wdyt @IlyasMoutawwakil ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants