-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[iOS] add unit tests to iOS CI jobs #30133
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
| PROJ_ROOT=/Users/distiller/project | ||
| source ~/anaconda/bin/activate | ||
| #install the latest version of PyTorch and TorchVision | ||
| #TODO: How to install the nightly build? |
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.
@ezyang is it possible to install a PyTorch nightly build on MacOS via pip? I searched a lil bit, didn't find the right command to do it. The goal here is to use a recent (up-to-date) version of PyTorch to generate a torchscript model for the iOS TestApp to test.
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.
Something like:
pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
as suggested in https://pytorch.org/get-started/locally/
.circleci/config.yml
Outdated
| - should_run_job | ||
| - checkout | ||
| - run_brew_for_ios_build | ||
| - run_brew_for_ios_build |
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.
nit: remove white space?
| _module.eval(); | ||
| std::vector<c10::IValue> inputs; | ||
| inputs.push_back(torch::ones({1, 3, 224, 224}, at::ScalarType::Float)); | ||
| torch::autograd::AutoGradMode guard(false); |
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.
Yes, the old RAII use didn't do anything :P
|
I'm a little concerned about relying on nightlies for per PR tests, because it means that a botched nightly build will break all signal on this job, and you won't have any easy remediation. In this sense, it is almost better to use the official build, which will rev much less frequently. However, the official build is only really OK if we maintain backwards-compatibility (which we should be, right @houseroad ?) So I feel the patch as is is better. |
### Summary Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors. ### Previous work - Add an unit test target to the iOS TestApp ( #29962 ) - Update Fastlane to run tests ( #29963 ) ### What's been changed in CI 1. XCode version has been updated to 11.2.1 2. For iOS simulator build, we'll run some unit tests( currently only one) after the build test. Differential Revision: [D18641413](https://our.internmc.facebook.com/intern/diff/D18641413)
### Summary Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors. ### Previous work - Add an unit test target to the iOS TestApp ( #29962 ) - Update Fastlane to run tests ( #29963 ) ### What's been changed in CI 1. XCode version has been updated to 11.2.1 2. For iOS simulator build, we'll run some unit tests( currently only one) after the build test. Differential Revision: [D18641413](https://our.internmc.facebook.com/intern/diff/D18641413)
### Summary Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors. ### Previous work - Add an unit test target to the iOS TestApp ( #29962 ) - Update Fastlane to run tests ( #29963 ) ### What's been changed in CI 1. XCode version has been updated to 11.2.1 2. For iOS simulator build, we'll run some unit tests( currently only one) after the build test. Differential Revision: [D18641413](https://our.internmc.facebook.com/intern/diff/D18641413)
### Summary Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors. ### Previous work - Add an unit test target to the iOS TestApp ( #29962 ) - Update Fastlane to run tests ( #29963 ) ### What's been changed in CI 1. XCode version has been updated to 11.2.1 2. For iOS simulator build, we'll run some unit tests( currently only one) after the build test. Differential Revision: [D18641413](https://our.internmc.facebook.com/intern/diff/D18641413)
Stack from ghstack:
Summary
Recently we've found that the master branch was constantly broken due to some unwanted change being landed on mobile. The problem is that our CI was not able to detect the runtime errors.
Previous work
What's been changed in CI
Differential Revision: D18641413