Slide 1

Slide 1 text

The Shameful Story of PR #4657 1 @lunardog 2017.03.15

Slide 2

Slide 2 text

2 @lunardog @fchollet @isaacgreg Travis STARRING ALSO FEATURING ©BBC ©Hine Mizushima Six Eyed Bandel

Slide 3

Slide 3 text

Background 3

Slide 4

Slide 4 text

4 DOGS vs CATS

Slide 5

Slide 5 text

5 KERAS.io

Slide 6

Slide 6 text

6 flow_from_ directory KERAS.io

Slide 7

Slide 7 text

7 data/train/cats/*.jpg data/train/dogs/*.jpg

Slide 8

Slide 8 text

8 A more complex dataset

Slide 9

Slide 9 text

9 The Problem

Slide 10

Slide 10 text

10 Computer says “NO”. ©BBC

Slide 11

Slide 11 text

%s/ os.listdir / os.walk /g 11 The Solution

Slide 12

Slide 12 text

“ 12

Slide 13

Slide 13 text

13 PR #4552 (not PR #4657)

Slide 14

Slide 14 text

14

Slide 15

Slide 15 text

15

Slide 16

Slide 16 text

16 © BBC Who is this?

Slide 17

Slide 17 text

17

Slide 18

Slide 18 text

18

Slide 19

Slide 19 text

19 ©Google This is what Francois Chollet looks like:

Slide 20

Slide 20 text

20 ©Google, poorly photoshopped by me ...but at that time, to me, he looked like this:

Slide 21

Slide 21 text

21 © BBC ...and this is what I looked like to him.

Slide 22

Slide 22 text

22

Slide 23

Slide 23 text

23

Slide 24

Slide 24 text

24

Slide 25

Slide 25 text

25 PR #4637 (burry that ugly code)

Slide 26

Slide 26 text

26

Slide 27

Slide 27 text

27

Slide 28

Slide 28 text

28

Slide 29

Slide 29 text

29

Slide 30

Slide 30 text

30

Slide 31

Slide 31 text

31

Slide 32

Slide 32 text

“ 32 Fail test in 30 minutes

Slide 33

Slide 33 text

“ 33 Fail test in 3 minutes!

Slide 34

Slide 34 text

“ 34

Slide 35

Slide 35 text

35 PR #4643 (battle with Travis)

Slide 36

Slide 36 text

36

Slide 37

Slide 37 text

37 MERGED!

Slide 38

Slide 38 text

38 Good boy, K9! © BBC ...but the game is not over yet.

Slide 39

Slide 39 text

39 ...back to PR #4637

Slide 40

Slide 40 text

40

Slide 41

Slide 41 text

41 bad robot dog... © BBC

Slide 42

Slide 42 text

42

Slide 43

Slide 43 text

43 PR #4657 Let’s do it right this time!

Slide 44

Slide 44 text

“ 44

Slide 45

Slide 45 text

45

Slide 46

Slide 46 text

46

Slide 47

Slide 47 text

47

Slide 48

Slide 48 text

48 MERGED!

Slide 49

Slide 49 text

49 The day is saved! © BBC

Slide 50

Slide 50 text

50 Lessons Learned 1. Contributing to Open Source is a fun and valuable experience 2. If you see something you can fix - go for it! 3. Yes, everybody will see your ugly code 4. ...and you may even end up showing it on a meetup. 5. Don’t rush it! 6. Read before you write 7. Explain your changes and reasons as well as you can 8. Follow the rules 9. Update the documentation 10. Lint your code before pushing 11. Write tests 12. Write tests! 13. Actually run those tests locally before pushing

Slide 51

Slide 51 text

51 Thanks to Francois Chollet for making Keras and being really supportive when reviewing my messy pull requests. ...and to Isaac Greg for asking me the right question at the right time. Keep on testing, Travis, good job! 6th eye is in the back

Slide 52

Slide 52 text

52 Thanks to BBC for making Doctor Who. Hoping to see K9 again. Please don’t be too cross at me for using these images.