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

Minor changes to test-examples #1882

Merged
merged 2 commits into from
May 23, 2019
Merged

Minor changes to test-examples #1882

merged 2 commits into from
May 23, 2019

Conversation

neerajprad
Copy link
Member

@neerajprad neerajprad commented May 23, 2019

Fixes #1875, #1871. Also includes a change so that pickled files can be loaded by np.load in multi_mnist, which would otherwise throw ValueError when we try to load already downloaded dataset in the AIR example. See this notice.

Caveat: This changes the Makefile default so that make test does not run pytest in a distributed setting. Doing so can lead to race conditions as pointed out by @null-a when multiple subprocesses running the same example (with different arguments, for instance) try to download the dataset to the same directory.

The ideal way to handle this would be by grouping some tests to run on the same worker in xdist. The support for such a feature is lacking. See: pytest-dev/pytest-xdist#365, pytest-dev/pytest-xdist#18. There are other alternatives that we can explore too - including grouping same examples into test classes and using LoadScope scheduler, or having a script that downloads and populates the datasets for all examples before distributing the tests.

I am however not sure if make test-examples is used that often locally that this is worth optimizing for, and have therefore opted for the simplest solution that wouldn't give unexpected results to new users. Existing users who already have datasets populated locally can always distribute the tests if they so like. Suggestions on alternatives are welcome.

@fritzo fritzo merged commit d184d5c into pyro-ppl:dev May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incomplete download of MNIST data
2 participants