Skip to content

Conversation

@ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Sep 5, 2023

What does this PR do?

Put the code under if __name__ == "__main__": so it won't affect other stuff (for example, pytest collection).

Doctest is currently failing due to this, see here

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

My bad, I forgot the tests would cover a script I put in that directory!

@ydshieh ydshieh merged commit 391f264 into main Sep 5, 2023
@ydshieh ydshieh deleted the use_main_in_conversion_script branch September 5, 2023 11:04
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
* fix

* fix

---------

Co-authored-by: ydshieh <[email protected]>
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 this pull request may close these issues.

3 participants