fastai

The fastai deep learning library

https://github.com/fastai/fastai

Science Score: 46.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: mdpi.com
  • Committers with academic emails
    7 of 259 committers (2.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.6%) to scientific vocabulary

Keywords

colab deep-learning fastai gpu machine-learning notebooks python pytorch

Keywords from Contributors

nbdev transformer cryptocurrency audio pretrained-models cryptography vlm speech-recognition jax deepseek
Last synced: 6 months ago · JSON representation

Repository

The fastai deep learning library

Basic Info
  • Host: GitHub
  • Owner: fastai
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage: http://docs.fast.ai
  • Size: 801 MB
Statistics
  • Stars: 27,393
  • Watchers: 609
  • Forks: 7,643
  • Open Issues: 260
  • Releases: 60
Topics
colab deep-learning fastai gpu machine-learning notebooks python pytorch
Created over 8 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners

README.md

Welcome to fastai

CI PyPI Conda (channel
only) docs

Installing

You can use fastai without any installation by using Google Colab. In fact, every page of this documentation is also available as an interactive notebook - click “Open in colab” at the top of any page to open it (be sure to change the Colab runtime to “GPU” to have it run fast!) See the fast.ai documentation on Using Colab for more information.

You can install fastai on your own machines with: pip install fastai.

If you plan to develop fastai yourself, or want to be on the cutting edge, you can use an editable install (if you do this, you should also use an editable install of fastcore to go with it.) First install PyTorch, and then:

git clone https://github.com/fastai/fastai
pip install -e "fastai[dev]"

Learning fastai

The best way to get started with fastai (and deep learning) is to read the book, and complete the free course.

To see what’s possible with fastai, take a look at the Quick Start, which shows how to use around 5 lines of code to build an image classifier, an image segmentation model, a text sentiment model, a recommendation system, and a tabular model. For each of the applications, the code is much the same.

Read through the Tutorials to learn how to train your own models on your own datasets. Use the navigation sidebar to look through the fastai documentation. Every class, function, and method is documented here.

To learn about the design and motivation of the library, read the peer reviewed paper.

About fastai

fastai is a deep learning library which provides practitioners with high-level components that can quickly and easily provide state-of-the-art results in standard deep learning domains, and provides researchers with low-level components that can be mixed and matched to build new approaches. It aims to do both things without substantial compromises in ease of use, flexibility, or performance. This is possible thanks to a carefully layered architecture, which expresses common underlying patterns of many deep learning and data processing techniques in terms of decoupled abstractions. These abstractions can be expressed concisely and clearly by leveraging the dynamism of the underlying Python language and the flexibility of the PyTorch library. fastai includes:

  • A new type dispatch system for Python along with a semantic type hierarchy for tensors
  • A GPU-optimized computer vision library which can be extended in pure Python
  • An optimizer which refactors out the common functionality of modern optimizers into two basic pieces, allowing optimization algorithms to be implemented in 4–5 lines of code
  • A novel 2-way callback system that can access any part of the data, model, or optimizer and change it at any point during training
  • A new data block API
  • And much more…

fastai is organized around two main design goals: to be approachable and rapidly productive, while also being deeply hackable and configurable. It is built on top of a hierarchy of lower-level APIs which provide composable building blocks. This way, a user wanting to rewrite part of the high-level API or add particular behavior to suit their needs does not have to learn how to use the lowest level.

Layered API

Migrating from other libraries

It’s very easy to migrate from plain PyTorch, Ignite, or any other PyTorch-based library, or even to use fastai in conjunction with other libraries. Generally, you’ll be able to use all your existing data processing code, but will be able to reduce the amount of code you require for training, and more easily take advantage of modern best practices. Here are migration guides from some popular libraries to help you on your way:

Windows Support

Due to python multiprocessing issues on Jupyter and Windows, num_workers of Dataloader is reset to 0 automatically to avoid Jupyter hanging. This makes tasks such as computer vision in Jupyter on Windows many times slower than on Linux. This limitation doesn’t exist if you use fastai from a script.

See this example to fully leverage the fastai API on Windows.

We recommend using Windows Subsystem for Linux (WSL) instead – if you do that, you can use the regular Linux installation approach, and you won’t have any issues with num_workers.

Tests

To run the tests in parallel, launch:

nbdev_test

For all the tests to pass, you’ll need to install the dependencies specified as part of dev_requirements in settings.ini

pip install -e .[dev]

Tests are written using nbdev, for example see the documentation for test_eq.

Contributing

After you clone this repository, make sure you have run nbdev_install_hooks in your terminal. This install Jupyter and git hooks to automatically clean, trust, and fix merge conflicts in notebooks.

After making changes in the repo, you should run nbdev_prepare and make additional and necessary changes in order to pass all the tests.

Docker Containers

For those interested in official docker containers for this project, they can be found here.

Owner

  • Name: fast.ai
  • Login: fastai
  • Kind: organization
  • Location: Australia

GitHub Events

Total
  • Create event: 9
  • Release event: 6
  • Issues event: 32
  • Watch event: 1,255
  • Delete event: 3
  • Issue comment event: 66
  • Push event: 47
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 51
  • Fork event: 181
Last Year
  • Create event: 9
  • Release event: 6
  • Issues event: 32
  • Watch event: 1,255
  • Delete event: 3
  • Issue comment event: 66
  • Push event: 47
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 51
  • Fork event: 181

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 2,459
  • Total Committers: 259
  • Avg Commits per committer: 9.494
  • Development Distribution Score (DDS): 0.713
Past Year
  • Commits: 66
  • Committers: 11
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.439
Top Committers
Name Email Commits
Jeremy Howard j@f****i 706
Sylvain Gugger s****r@g****m 483
Hamel Husain h****u@g****m 144
muellerzr m****r@g****m 143
Benjamin Warner me@b****v 69
Thomas Capelle t****e@g****m 35
Marii m****i@m****e 35
Malligaraj Malleswaran m****j@g****m 33
Tanishq Abraham 3****m 30
Kevin Bird k****5@g****m 30
Boris Dayma b****a@g****m 28
Hamel Husain h****n@g****m 25
Lucas Vazquez l****z@g****m 25
moritzschwyzer m****r@g****m 17
ohmeow w****m@o****m 15
Arto a****t@g****m 15
tyoc213 t****t@t****x 13
dependabot[bot] 4****] 13
Your Name y****u@e****m 13
Hoa h****a@h****1 12
Hoa d****t@g****m 11
Kushajveer Singh k****l@g****m 11
Omer Dor 8****r 10
Manikandan Sivanesan m****n 9
Albert Villanova del Moral 8****a 9
Thomas Capelle t****e@s****m 9
kamil-kaczmarek k****k@n****l 9
Phillip K.S. Chu p****e@w****t 8
Rens Dimmendaal rd@a****i 8
Morgan McGuire m****1 8
and 229 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 182
  • Total pull requests: 144
  • Average time to close issues: 3 months
  • Average time to close pull requests: 21 days
  • Total issue authors: 163
  • Total pull request authors: 76
  • Average comments per issue: 1.54
  • Average comments per pull request: 2.1
  • Merged pull requests: 87
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 32
  • Pull requests: 49
  • Average time to close issues: 21 days
  • Average time to close pull requests: 4 days
  • Issue authors: 29
  • Pull request authors: 26
  • Average comments per issue: 0.25
  • Average comments per pull request: 1.37
  • Merged pull requests: 23
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • mode80 (3)
  • Alainfa46 (3)
  • warner-benjamin (3)
  • Zoyakhan97 (2)
  • unikill066 (2)
  • celestinoxp (2)
  • baida21 (2)
  • kevin-vitro (2)
  • afaque081 (2)
  • simonm3 (2)
  • tttiago (2)
  • myenugula (2)
  • digitalusman99 (2)
  • jaideep11061982 (2)
  • jph00 (2)
Pull Request Authors
  • warner-benjamin (37)
  • RensDimmendaal (10)
  • myenugula (7)
  • NickOveracker (6)
  • dependabot[bot] (6)
  • kevin-vitro (4)
  • FacuRoffet99 (3)
  • jkyamog (3)
  • nglillywhite (3)
  • tonyhoo (3)
  • gautam-e (3)
  • CraigRichards (2)
  • nikhilmalkari8 (2)
  • sreejithitvlb (2)
  • KareimGazer (2)
Top Labels
Issue Labels
enhancement (4) bug (4)
Pull Request Labels
enhancement (19) bug (11) dependencies (6) waiting for response (1) github_actions (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 517,017 last-month
  • Total docker downloads: 20,016
  • Total dependent packages: 64
  • Total dependent repositories: 2,806
  • Total versions: 146
  • Total maintainers: 2
pypi.org: fastai

fastai simplifies training fast and accurate neural nets using modern best practices

  • Versions: 146
  • Dependent Packages: 64
  • Dependent Repositories: 2,806
  • Downloads: 517,017 Last month
  • Docker Downloads: 20,016
Rankings
Forks count: 0.1%
Stargazers count: 0.1%
Dependent repos count: 0.2%
Dependent packages count: 0.3%
Average: 0.4%
Downloads: 0.6%
Docker downloads count: 1.1%
Maintainers (2)
Last synced: 6 months ago