Skip to content

Remove setting of PT_HPU_LAZY_MODE=2 in training_args.py#625

Merged
regisss merged 6 commits into
huggingface:mainfrom
HabanaAI:cleanup
Jan 10, 2024
Merged

Remove setting of PT_HPU_LAZY_MODE=2 in training_args.py#625
regisss merged 6 commits into
huggingface:mainfrom
HabanaAI:cleanup

Conversation

@vivekgoe
Copy link
Copy Markdown
Collaborator

@vivekgoe vivekgoe commented Jan 7, 2024

What does this PR do?

Cleanup code in training_args.py to remove setting of PT_HPU_LAZY_MODE=2 (this is not supported SynapseAI release 1.13.0 onwards).

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?

@vivekgoe vivekgoe marked this pull request as ready for review January 7, 2024 13:19
@vivekgoe vivekgoe requested a review from regisss as a code owner January 7, 2024 13:19
@vivekgoe vivekgoe added the run-test Run CI for PRs from external contributors label Jan 7, 2024
@vivekgoe vivekgoe closed this Jan 7, 2024
@vivekgoe vivekgoe reopened this Jan 7, 2024
Comment thread optimum/habana/transformers/training_args.py Outdated
Comment thread optimum/habana/transformers/training_args.py Outdated
Vivek Goel and others added 3 commits January 8, 2024 15:10
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

@vivekgoe vivekgoe added run-test Run CI for PRs from external contributors and removed run-test Run CI for PRs from external contributors labels Jan 8, 2024
@vivekgoe
Copy link
Copy Markdown
Collaborator Author

vivekgoe commented Jan 8, 2024

@regisss Since I pushed this PR from a fork which has a different name "HabanaAI/optimum-habana-fork" instead of usual "user-name/optimum-habana , there was a failure in Build PR documentation step. I added a small change to Dockerfile to fix this.
With change in this PR, only eager mode test we have (test_trainer.py/test_eager_mode) started failing (throwing new assert we have added in this PR). This can be fixed only when whole test suite is switched to PT_HPU_LAZY_MODE=0, reason is that this environment variable can't be updated once Synapse SW is loaded. For now I have added a skip for this test, please suggest if you can think of a better solution.

@vivekgoe vivekgoe added run-test Run CI for PRs from external contributors and removed run-test Run CI for PRs from external contributors labels Jan 8, 2024
Comment thread tests/test_trainer.py
Copy link
Copy Markdown
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM

@regisss regisss merged commit 979c132 into huggingface:main Jan 10, 2024
@vivekgoe vivekgoe deleted the cleanup branch January 10, 2024 10:49
jychen21 pushed a commit to jychen21/optimum-habana that referenced this pull request Feb 27, 2024
gplutop7 pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Oct 15, 2025
…ggingface#625)

Co-authored-by: Piotr Bielak <pbielak@users.noreply.github.com>
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-test Run CI for PRs from external contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants