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

Test overhaul #10291

Merged
merged 1 commit into from
May 19, 2023
Merged

Test overhaul #10291

merged 1 commit into from
May 19, 2023

Conversation

akx
Copy link
Collaborator

@akx akx commented May 11, 2023

Describe what this pull request is trying to achieve.

This PR is trying to enable a slightly more standard method of running tests, using Py.test.

It also enables coverage reporting - one could enable e.g. codecov.io or another service for tracking coverage metrics. Right now you can look at the output and HTML coverage reports in the Check Artifacts.

Additional notes and description of your changes

  • Instead of launch.py working double duty as a test runner, py.test is run separately against a regular webui server (running launch.py with --test-server configures it for tests, as it had done before with --tests ***).
  • Since there was really no documentation for the testing, there still is none.

Environment this was tested in

  • OS: Windows, macOS, GitHub Actions
  • Browser: not really
  • Graphics card: sure

@akx akx force-pushed the test-overhaul branch 6 times, most recently from 52cd19b to b0ed4ba Compare May 11, 2023 20:13
@akx akx force-pushed the test-overhaul branch 9 times, most recently from 60a8025 to 3a99d2f Compare May 17, 2023 07:10
@akx akx mentioned this pull request May 17, 2023
@akx akx changed the title (WIP) Test overhaul Test overhaul May 17, 2023
@akx akx marked this pull request as ready for review May 17, 2023 16:15
@akx akx requested a review from AUTOMATIC1111 as a code owner May 17, 2023 16:15
@AUTOMATIC1111
Copy link
Owner

AUTOMATIC1111 commented May 17, 2023

27 files changes

files added

files deleted

aaaaaa

@akx
Copy link
Collaborator Author

akx commented May 17, 2023

aaaaaa

Sorry, it's just renaming files to match the usual py.test pattern of test_*.py 🥲

@AUTOMATIC1111
Copy link
Owner

Will you update the wiki page with instructions for people to run tests on their own machines? https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Tests

@AUTOMATIC1111
Copy link
Owner

are you considering the question

@akx
Copy link
Collaborator Author

akx commented May 19, 2023

are you considering the question

Sorry, missed the notif. Sure, I'll update the wiki if this gets merged 👍

@AUTOMATIC1111 AUTOMATIC1111 merged commit 0d84055 into AUTOMATIC1111:dev May 19, 2023
@akx akx deleted the test-overhaul branch May 30, 2023 15:04
@illtellyoulater
Copy link
Contributor

illtellyoulater commented Jul 10, 2023

While I was experimenting with command line arguments I used "--server-test" and I got something like this:

Launching Web UI with arguments: --test-server --api --ckpt test/test_files/empty.pt --skip-torch-cuda-test --disable-nan-check
Loading weights [d030ad8db7] from test/test_files/empty.pt
Creating model from config: configs/v1-inference.yaml
Downloading pytorch_model.bin:   9%|████████▍                                                                                   | 157M/1.71G 
Downloading pytorch_model.bin:  30%|███████████████████████████▋                              | 514M/1.71G 
^C
Interrupted with signal 2

As you can see I stopped the execution with ctrl-c as I was not sure what was going on and why it was downloading additional model files, how many it would download - and most importantly - how these operations would affect my current webui install.

Can anyone tell me whether the above operations made permanent changes to my webui install?
If so, is there a way to revert them without having to clone the webui repo from scratch?

The only documentation I could find about --test-sever (https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Tests) says very little and doesn't answer to my questions... I later found the partly downloaded model in "/home/myusername/.cache/huggingface/hub/..." and I deleted it.. but other than that I have no idea what else was changed.

@lllyasviel
Copy link

lllyasviel commented Aug 23, 2023

Although it might be too late to against this change, but I still want to bring into attention that this change just break all extensions’ github ci tests. Please consider still having “--tests”.
But things are already too late ...

@akx
Copy link
Collaborator Author

akx commented Aug 23, 2023

@lllyasviel This happened a third of a year ago...

@catboxanon
Copy link
Collaborator

I think this is related: #11441

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.

5 participants