How to contribute to fastai [Discussion]

FYI Added to low hanging fruit:

If you have any questions or issues please post them in the corresponding thread: Documentation improvements Thank you.

1 Like

A post was merged into an existing topic: Documentation improvements

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

Great write up, @Benudek. Thank you for sharing your story and insights.

May I just suggest that the intention behind inviting the stories is not to motivate anybody. We are not a corporation that needs to motivate its employees. I believe people who come to this thread are already motivated to give back after receiving so much. They just don’t know how and/or are uncertain that they can. Therefore, I feel, the problem is not a lack of motivation, but a need to demonstrate that the contributing can be done on different levels and by users with a very wide range of skills and experience, leading to wide range of contributions from submitting a broken link or a typo fix to a complicated algorithm PRs, overall all being equably important, because it’s the whole that makes a great product and not just its parts.

And to clarify, I’m not asking you to edit your story, just wanting to make a stress on why we are inviting users to share these stories.

4 Likes

Here is an inspiring personal sharing on figuring out how to contribute to an open-source project by Vishwak Srinivasan of the pytorch dev community.

4 Likes

A post was merged into an existing topic: Fastai-nbstripout: stripping notebook outputs and metadata for git storage

Hi Stas,

I’ve been watching the Deep Learning course 2019 and was inspired by the example Jeromy gave of the gentleman that contributed with code. Specially because I’ve been working on something that one of the students asked which was to automatically find the learning rate. I developed an AutoML hyperparameter algo that has been beating random search, and skopt’s Baysian Optimization. I’m using Pattern Search which is MATLAB’s method for finding global optima (my code is in Python 3.6 and I have adapted it to work in the SKLearn framework, so you can call the code just like you call RandomizedSearchCV). Is there anyone that I could show the notebook, to see if it is something interesting to incorporate into Fast.ai?.

Best regards,

Rodrigo.

i am phd student working on remote monitoring of aquaculture sea cages, and i want to use fast ai library to count fishes in a cage can you guide me please ?

I can’t ask question on forums. Any idea?

@stas i would like to contribute to test cases, can please let me know fastai v2 test cases location for test_core.py thanks

Sorry, I’m no longer involved in fastai. Please ask someone else, thank you.

hi all, any advise on where to find test cases file to contribute to in fastai 2. thanks

Hello everyone,
My goal is to submit a jupyter notebook I made that breaks down the steps to obtaining the keys for the Bing Search API. I am trying to follow the contributing guidelines, but I am having trouble installing git hooks with: nbdev_install_git_hooks

One method I have tried is through a command line (I am a noob):

I found “pull requests made easy” which brought me to downloading github desktop, I know enough that I do not want to PR to the master:

However, I feel that I should be executing the jupyter notebook from “pull requests made easy” , but I sadly cant figure out how to download it. I was able to get as far as installing the bash kernel:

I am honestly not sure what direction to head in. Any advice is greatly appreciated.