How to contribute to fastai [Discussion]

Case Study: helping with Test coverage

I write up a little case study following @stas example to motivate others to contribute, especially helping with tests.

My background is currently spend around half of my time coding for a living, I consider myself a good, not fantastic coder. I started DL a year ago and my python knowlegde was mostly non-existant even though I know all the concepts from education and other languages. Python is a lot of fun for me, so many cool libraries and that is already a gain for me. I am also co-organising a fast.ai meetup in the hague, Netherlands

I chose testing, for some reasons. One, we get this MOOC for free, crazy right? So why not try to give back a little. Of course, I do it for myself. It’s cool to have commits in a project like fast.ai and testing is a safe bet to find easy tasks that are useful for the project. I consider myself nowhere near to make a substantial PR, maybe could fix some bugs though meanwhile and write tests for them. Tests are just useful for projects to guarantee stable code, they can be sometimes a little drag but they give you a good learning curve and hopefully one day you can get to other areas.

There is a couple of gotchas when you contribute:

  • Contributions might require more time than you expected. So if you work full time, have a private life you might get a little under pressure for a while. It’s not nice starting a project with others and then letting forum posts unanswered, so if you start try to pull through. And be realistic what you can do and be open about it.

  • It is also easy to come up with all kinds of great ideas on features while not having finished the simpler tasks nor having thought through if such PRs are possible and you find the time to do it. So probably good to stick to one really simple task and take it step by step

  • Then, this is meant to be a contribution not a training camp for you. While of course, you will and should learn, am personally quite concerned to cause the maintainers like Stas and Sylvain not more work than value they get back. So, I do my best and probably in the future will even be more careful to what tasks I contribute. Need to be confident I can deliver reasonable fast & smooth.

Overall, this is fantastic stuff and here are the benefits for you.

  • For example, I wrote a little test for fit and fit_one_cycle. Helps to me really understand what’s going on now - and I am now the guy who tests this cool stuff from Sylvain and Lesley? Cool … put it on my CV :slight_smile: Isn’t that much cooler than making another DL cert on some MOOC?

  • I also learnt quite a bit how to automate this whole git process with scripts and python, sth I can directly apply in my professional life.

  • Stas and Sylvain are really great coders, Jeremy gave the code a lot of thought and has all kinds of ideas why eg. functions are written in certain ways. You can just learn with the masters (I get a lot out of listening to Stas reviews!) and hopefully be useful for a great project. Standards are high and you can grow with it.

Go for it, am actually sure most reading this have more time & python skills than I have so it should be totally possible to contribute !

And here 2 concrete ways 2 contribute:

  • You can find ways to contribute tests here: https://forums.fast.ai/t/improving-expanding-functional-tests. Just pic an easy part, there are easy tests, some might be more difficult.
  • Meanwhile, we have a little spin off to automate docs based on tests: Doc_test project .For that part soon, we will need to go through all tests and register then correctly with a function this_tests. The idea is we show the tests to the notebook user and in automated docs. Just pick a test class and place the this_tests in there, when we are ready. As part of this spin off, we need to register existing tests with this_tests to integrate those into a Documentation.
6 Likes