-
Notifications
You must be signed in to change notification settings - Fork 6.3k
[Refactor] Move testing utils out of src #12238
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
Conversation
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, thank you! Just one comment.
@@ -24,7 +24,8 @@ | |||
from diffusers.pipelines.pipeline_utils import DiffusionPipeline | |||
from diffusers.utils import get_logger | |||
from diffusers.utils.import_utils import compare_versions | |||
from diffusers.utils.testing_utils import ( | |||
|
|||
from ..testing_utils import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be using torch_utils
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The utils still exist in tests/testing_utils
. Just did a search/replace here. Can do a follow up to handle importing the stuff that has been moved to torch_utils
This reverts commit 65efbce.
What does this PR do?
No need to ship our testing utils. This PR
diffusers.utils.testing_utils
Unfortunately we can't just remove
testing_utils.py
from src because it appears to be used in a lot of placeshttps://github.com/search?q=%22from+diffusers.utils.testing_utils+import%22+language:python&type=code
Although, most of these are probably forks. Just to be safe, we'll do a deprecation now and remove by 1.0.0
Fixes # (issue)
Before submitting
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.