Fix Test CI by pinning hypothesis and correcting the import (#31137)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31137
Our Test CI is broken because:
- hypothesis recently did a new release that reorganized their internal
modules
- we were importing something from their internal module structure.
This PR fixes the CI by doing the following:
- import SearchStrategy from the correct (public) location
- Pin the hypothesis version to avoid future surprises.
In the long term, we should stop install hypothesis every time the CI
runs and instead install it as a part of our docker build process. See
https://github.com/pytorch/pytorch/issues/31136 for details.
Test Plan:
- I tested this locally; before this PR test/test_nn.py fails to run but
after it does run.
- Wait for CI
Differential Revision: D18940817
Pulled By: zou3519
fbshipit-source-id: c1ef78faa5a33ddf4d923f947c03cf075a590bb8