Fastai2 Blog Posts, Projects, and Tutorials

Just posted my Fastpages blog: http://gullys.website/.

My focus is on how Scientific Knowledge Engineering and Data Science intersect and will be diving into the relationship between the two in future posts.

I have yet to really develop anything hugely technical involving notebooks and the really interesting innovations of fastpages, but I kicked the blog off with a fun rewrite of an earlier post about how data science work counters online trolls and misinformation.

Enjoy!

Gully

1 Like

Hi GullyABurns I hope you are having a jolly day!

Thanks for an interesting and informative post, which I believe tackles one of the biggest issues we face at this current time in terms of trustworthy communications.

Can you help me with this problem I have, below is an explanation and my answer? :smiley:

I have wanted to buy a cordless drill, I have spent some hours researching on the internet. For any search I do for the ‘best cordless drill’ I get such a wide variety of choices that it is impossible for me to choose one with any degree of certainty that it is the “best”.

The reason for this for at least 50 of the 300 models I would possibly buy, each one of them has been voted as the best available in its category or range by some organization, person or entity.

My solution to this problem has been to join a group of craftsmen with 2.5k members where they eat sleep and breath cordless drills, as they use them in their work and they have voted through their experience and none of them works for drill manufacturers.

I have physically know some of them and have met them in the flesh, I trust their judgment and have been to some their workplaces.

Hence my decision.

So now I have found this organization no amount of science, academic papers, drill manufacturers or amazon reviews will change my choice as I believe I have made the right choice.

And trust all other sources less than the one I have found so far.

I have a degree in Electrical and Electronic Engineering and one in Computer Science so just like any member of the public I have to use my best judgement to make my decisions.

So just as some companies hire people based on recommendation, we as individuals tend to choose based on what we believe to be true.

In conclusion I think we are approaching a time where all humans will have to be " more ethical" what ever that means in telling the truth. In order for issues like you mention to be resolved.

Cheers mrfabulous1 :smiley: :smiley:

Mr. Fab.

I think you’re touching on all the wonderful ways that humans make decisions, based on ‘irrational’ mechanisms that incorporate all sorts of natural biases, etc. Have you seen the ‘Cognitive Bias Codex’? (https://www.teachthought.com/critical-thinking/the-cognitive-bias-codex-a-visual-of-180-cognitive-biases/)

My point is that the way you make your decision about cordless drills, or how most people make decisions generally is not really all that driven by abductive reasoning (finding the best available explanation for all known facts). In fact, the recent discussions promoted by Jeremy on masks where people from WHO and other organizations dig in their heels suggests to me that scientists are prone to other fallacies that also cause problems.

If you want the best cordless drill get performance data, model that data, make some predictions about how well drills perform, test those predictions and then make a choice. A data-science / wizardly way of solving that problem really shouldn’t involve you making any argument about your level of expertise since then you’re arguing from authority and it’s not data driven.

Nice to hear the dulcet tones of a fellow Brit shine through in the note too :slight_smile:

Best

Gul

1 Like

Hi GullyABurns I hope you are having a magnificent day.

Can I just say your answer made me chuckle, It highlighted to me how bias works in a practical manner, (I like many people often think we are bias free or not as biased as others :grinning:)

I am going to pin this on my wall! to remind me to be stay as objective as possible.

:grinning: :grinning: :grinning: :grinning:

cheers mrfabulous1 :grinning: :grinning:

Just posted https://tyoc213.github.io/blog/fastai2/2020/05/26/Reconocer-dígitos.html which would be about using fastai2 for digit recognition and submiting it to kaggle (I got high, guess I will share while it last :stuck_out_tongue:) , I must ask for this type of competitions is ok to share the code, isnt?

Thought it is in spanish and I think I need to finish it up a little, but hell it is there at less :slight_smile:.

1 Like

I created a package that helps with interpretation, and adds some other utilities as well. I’ve written about it more extensively in a dedicated forum post.
Link: Fastai-extensions Package

Do you think it makes sense to add a Packages section to the wiki and put this on there as well?

That could be a possibility. Sylvain is eventually going to have something more organized for all of our extensions for fastai2 in the library.

@sgugger any updates on those plans? :slight_smile:

I didn’t get to make a lot of progress on it yet. In the meantime, adding a Packages in the wiki up there would be cool to have a reference to this one.

@rsomani95 Just in terms of naming, we’d like any extension to be named fastai2.something (eventually just fastai.something when v2 is released so you can change the name only once and wait for the release).

1 Like

Cool, I’ll add it up there then.

That makes sense. I’m a bit unclear – are you suggesting I change the name now, or expect to when v2 is officially released?

You can change it already if it’s not too much trouble, but if you want to avoid changing the name twice, wait for the official release.

Alright, I’ll wait for the official release :slight_smile:

@clck10 sanity checking for fastaiv2 blogpost is the best thing I read today. Well written post. Thank you

1 Like

Now that the course has been released, if folks have course related blogs you can also post them here, this way we can keep everything centralized :slight_smile:


Introducing Fastai 2020 course.
Blog on how Fastai is different and can be a great help for beginners.

Hi Everyone! Super excited to be learning FastAI! I just wrote my first blog post about AI today! Check it out here: https://bit.ly/2Db39e4

Feedback on the article would be great! Thanks! :slight_smile:

1 Like

Hi guys,
This is the first time I’m sharing my working with fastai! I’m not a very good coder, so it took a while to build some confidence and a few days of hard work to share my project here.

Some months ago I used ULMFit to train a model to generate molecules and classify them as active or inactive against a biological target. That was with fastai V1 and I was quite surprised how simple the final version was (after many weeks of work trying to understand the foundations). The first version was on fastai v1 and a paper is on peer-review. In addition, my lab got a grant so we will be using my model a lot in the next couple of months!

Following ULMFit paper, this is the approach I’m using:

  1. Training of a general model using as much chemical structures I could find. In this case, I used ChEMBL database. The model was trained with over 1.5 million structures.
  2. Fine-tuning the model to a particular biological target or chemical space
  3. Fine-tuning a classifier for bioactivity prediction.

So far I’ve reimplemented the pretrained model on fastai V2. It took me a while to get used to the new dataloaders and callbacks. But I didn’t do the new course yet, so I think there’s still room for improvements.

Here’s a notebook if you are interested in drug discovery and how to apply deep learning and fastai to it! Let me know if you have any suggestions so I can improve it.

5 Likes

Hi marcossantana great work!

I only have grade school chemistry skills so can’t add anything but from a DL perspective your notebook is well thought out.

Cheers mrfabulous1 :smiley:

1 Like

Thanks ahahha
I will update with fine-tuning as soon as I find out how to save the vocab in fastaiv2.
Edit:
For those wondering how to save the vocab:

with open(LM/'vocab.pkl', 'wb') as f:
  pickle.dump(learn.dls.vocab, f)
2 Likes

You can also do torch.save(dls.vocab) then load it back in with torch.load()

4 Likes

@muellerzr do you think its worth me submitting a dls.save type PR? v1 had similar right? Especially hand for nlp where you’d like to keep the vocab intact.

3 Likes