Ensure indices list in sparse optimizer tests is unique

Summary:
There were no dimensionality constraints to the generated indices
array, causing many examples being generated and filtered out. Instead,
we should ensure the probability of unique indices is high.

There is a better fix for this by using the `unique` keyword argument
to `hypothesis.extra.numpy.arrays`, but this is available only in
hypothesis version 3.28.0 and later.

This is related to #1536 and #1599.

Once this change has proven to be OK, we can modify the other tests
that now have health check suppression enabled as well.
Closes https://github.com/caffe2/caffe2/pull/1686

Reviewed By: Yangqing

Differential Revision: D6651789

Pulled By: pietern

fbshipit-source-id: d80886c9ccf0a7a842a7580a279f33a2d6cca97c
3 files changed
tree: fc3b8ea55bbd45fd1b178364a60be8f85094d2fe
  1. .github/
  2. .jenkins/
  3. .travis/
  4. caffe/
  5. caffe2/
  6. cmake/
  7. conda/
  8. docker/
  9. docs/
  10. modules/
  11. scripts/
  12. third_party/
  13. .Doxyfile
  14. .Doxyfile-c
  15. .Doxyfile-python
  16. .gitattributes
  17. .gitignore
  18. .gitmodules
  19. .travis.yml
  20. appveyor.yml
  21. CMakeLists.txt
  22. LICENSE
  23. Makefile
  24. NOTICE
  25. README.md
  26. release-notes.md
  27. setup.py
  28. VERSION_NUMBER
README.md

Caffe2

License Jenkins Build Status Appveyor Build Status

Caffe2 is a lightweight, modular, and scalable deep learning framework. Building on the original Caffe, Caffe2 is designed with expression, speed, and modularity in mind.

News and Events

Caffe2 research award competition request for proposals

Questions and Feedback

Please use Github issues (https://github.com/caffe2/caffe2/issues) to ask questions, report bugs, and request new features.

Please participate in our survey (https://www.surveymonkey.com/r/caffe2). We will send you information about new releases and special developer events/webinars.

License

Caffe2 is released under the Apache 2.0 license. See the NOTICE file for details.

Further Resources on Caffe2.ai