Iāve moved this to the āadvancedā category.
I have no experience doing any of this but Iām willing to roll my sleeves up and learn while helping!!
Thatās an awesome attitude! Just yell if you need any help.
@shoof @jayeshsaita @cedric @devforfu I really like the idea of moving some of the key parts of the fastai library into plain PyTorch, and, even more interestingly, extending some of the functionality. We could create both fastai-independent and dependent versions. If we enhance something sufficiently, we should create a pull request with a dependent version. Iām definitely up to help with a few key parts of this. If we get at least two people to volunteer, then we can split up responsibilities and check in on progress every now and then.
Thatās an interesting idea. However, I propose to make sure that we really understand how the library works at first, helping with tests, digging into PyTorch, building custom torch.Dataset
classes, applications, meaningful PRās, etc. Then weāll get enough expertise, I believe, to make our own forks.
Of course, it is only my point of view, based on some experience with building training loops and data loaders. And, probably others already are quite flexible with fastai
and pytorch
. Anyway, would be glad to participate in fastai
development, its forks, or inspired-by libraries.
Also this way youāll get a lot of help from me and the team here! Weāll review your code, make suggestions, and give you support if you get stuck.
Yes, agree, thatās the main benefit I would say! I am sure that fastai team would be a great help for anyone who wants to build something within fastai and pytorch ecosystem.
I want to learn internals of this version of fastai.
I did go through the fastai_V1 code internals and tried implementing learner and imagedataloader class in pytorch/python.
I want to contribute to this initiative and be part of code reviews and idea discussions.
Hi @jeremy thanks for the very practical advice. Very useful for beginners like me. So i followed all the instructions to setup the developer install and ran the pytest
command. Looks like test_image_data
in tests/test_vision_train.py
is failing.
Here is what i get:
On little experimenting in the notebook: i think the line assert abs(d.mean()-0.2)<0.1
is the reason why the test is failing. So i tried to check the real mean of the first images in the dataset. See the image below, where i try to replicate the test case.
In particular cell 31
output suggests that mean of the img
- 0.2 is 0.1181
whereas the test asserts it to be less that 0.1.
I think this maybe the reason it is failing.
*this is my first time messing around with testing/contributing in an open source library. little guidance for the first time will be much appreciated. In case this is not really an issue, many apologies.
@jeremy Little update, if i change the assert condition mentioned above to assert abs(d.mean()-0.2) < 0.12
all the test pass. Why 0.12 because the mean of the image - 0.2
is 0.1181
. Image below of all the test passing.
Not relevant to your question but I wound advice to use pytest.approx function to compare floating point numbers.
thanks. i will use pytest.approx and see how it goes. I am still new at this. I will make changes in the appropriate function. But not sure about next step so waiting for @jeremyās response or someone else. not sure who to contact. Would you be able to guide for the next steps ?
opened an issue in repo. https://github.com/fastai/fastai/issues/1007
*names and email addresses are different from here to github, apologies for that.
Thatās odd - the test passes for me. Iāll increase the threshold however to fix for you too.
ICAMI, a follow-up to Vijayās original post.
https://forums.fast.ai/t/lesson-1-learner-what-goes-on-behind-in-the-fastai-library/29346?u=cedric
In continuation of my efforts to dig deeper and understand how the fastai library works, I embarked upon the task of finding out how the ālearnerā that we create in Lesson 1 operates. As a part of the same I have created this post and along with it a Jupyter notebook that explains the code line by line as well as a presentation (converted into pdf) on the same.
Vijay first presented this to our virtual study group in Asia where his project is attempting to understand deeper into the internals of fastai v1 ālearnerā object, something that is currently undocumented:
- He has deep dive into fastai v1 and deconstructed some of the codes there.
- Go through what is behind the scene of the fastai v1.
Would this be the new link: https://github.com/fastai/fastai/search?p=2&q="new+methods"&unscoped_q="new+methods" ?
Best regards
Michael
Nice, the new link is returning results instead of empty results previously. So the difference is, this is searching fastai repo instead of fastai_docs repo
If I remember correctly it was mentioned that they merged the docs with the main repo, but I cannot find the thread now.
Yes, thanks for the update.
Iām interested in doing this as well since Iāve got an idea for a webapp that I want to build but unfortunately, Iām struggling with doing the following in Fast.ai (which can be done in pure Pytorch):
-
Online Learning: receiving a single labeled example from the user and training the neural net on just that one example (batch).
-
Regression: unfortunately, Iām having a lot of problems performing regression on images using fast.ai.
Also, Iām very interested in implementing ULMfit in Pytorch since itās only available on Fast.ai right now.