torchgeo icon indicating copy to clipboard operation
torchgeo copied to clipboard

Faster notebook testing

Open adamjstewart opened this issue 3 years ago • 1 comments

Summary

We should make our tutorial notebook tests faster.

Rationale

Our tutorial notebooks currently take 40+ minutes to test. We hope to greatly expand the number of tutorials in TorchGeo in the future, so we should find ways to improve testing time. Some of these improvements may even translate to other tests as well. If we can get our tutorial notebook tests < 10 min, we could consider testing them on all PRs, Python versions, and platforms.

Implementation

I've had several ideas for how to improve this:

  • Cache download files using cache action
  • Run tests in parallel using pytest-xdist
  • Use hidden cells or env vars to shorten number of epochs in nbmake

Alternatives

If anyone can think of any other options, let me know!

Additional information

No response

adamjstewart avatar Jul 10 '22 21:07 adamjstewart

Also found nbval, possibly another option to nbmake.

adamjstewart avatar Jul 12 '22 00:07 adamjstewart