fastai


Namefastai JSON
Version 2.7.18 PyPI version JSON
download
home_pagehttps://github.com/fastai/fastai
Summaryfastai simplifies training fast and accurate neural nets using modern best practices
upload_time2024-10-19 03:20:28
maintainerNone
docs_urlNone
authorJeremy Howard, Sylvain Gugger, and contributors
requires_python>=3.8
licenseApache Software License 2.0
keywords fastai deep learning machine learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Welcome to fastai

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

[![CI](https://github.com/fastai/fastai/actions/workflows/main.yml/badge.svg)](https://github.com/fastai/fastai/actions/workflows/main.yml)
[![PyPI](https://img.shields.io/pypi/v/fastai?color=blue&label=pypi%20version.png)](https://pypi.org/project/fastai/#description)
[![Conda (channel
only)](https://img.shields.io/conda/vn/fastai/fastai?color=seagreen&label=conda%20version.png)](https://anaconda.org/fastai/fastai)
![docs](https://github.com/fastai/fastai/workflows/docs/badge.svg)

## Installing

You can use fastai without any installation by using [Google
Colab](https://colab.research.google.com/). 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](https://course.fast.ai/start_colab) for more information.

You can install fastai on your own machines with conda (highly
recommended), as long as you’re running Linux or Windows (NB: Mac is not
supported). For Windows, please see the “Running on Windows” for
important notes.

We recommend using
[miniconda](https://docs.conda.io/en/latest/miniconda.html) (or
miniforge). First install PyTorch using the conda line shown
[here](https://pytorch.org/get-started/locally/), and then run:

``` bash
conda install -c fastai fastai
```

To install with pip, use: `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](https://github.com/fastai/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](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527),
and complete [the free course](https://course.fast.ai).

To see what’s possible with fastai, take a look at the [Quick
Start](https://docs.fast.ai/quick_start.html), 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](https://docs.fast.ai/tutorial.html) 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](https://www.mdpi.com/2078-2489/11/2/108/htm).

## 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.

<img alt="Layered API" src="https://raw.githubusercontent.com/fastai/fastai/master/images/layered.png" width="345">

## 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:

- [Plain PyTorch](https://docs.fast.ai/examples/migrating_pytorch.html)
- [Ignite](https://docs.fast.ai/examples/migrating_ignite.html)
- [Lightning](https://docs.fast.ai/examples/migrating_lightning.html)
- [Catalyst](https://docs.fast.ai/examples/migrating_catalyst.html)

## 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](https://github.com/fastai/fastai/blob/master/nbs/examples/dataloader_spawn.py)
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](https://github.com/fastai/docker-containers#fastai).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fastai/fastai",
    "name": "fastai",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "fastai, deep learning, machine learning",
    "author": "Jeremy Howard, Sylvain Gugger, and contributors",
    "author_email": "info@fast.ai",
    "download_url": "https://files.pythonhosted.org/packages/fa/9a/f086598db4f30447534bc687d4f90ab77c5382fa242d36d6c79db75e39d5/fastai-2.7.18.tar.gz",
    "platform": null,
    "description": "# Welcome to fastai\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n[![CI](https://github.com/fastai/fastai/actions/workflows/main.yml/badge.svg)](https://github.com/fastai/fastai/actions/workflows/main.yml)\n[![PyPI](https://img.shields.io/pypi/v/fastai?color=blue&label=pypi%20version.png)](https://pypi.org/project/fastai/#description)\n[![Conda (channel\nonly)](https://img.shields.io/conda/vn/fastai/fastai?color=seagreen&label=conda%20version.png)](https://anaconda.org/fastai/fastai)\n![docs](https://github.com/fastai/fastai/workflows/docs/badge.svg)\n\n## Installing\n\nYou can use fastai without any installation by using [Google\nColab](https://colab.research.google.com/). In fact, every page of this\ndocumentation is also available as an interactive notebook - click \u201cOpen\nin colab\u201d at the top of any page to open it (be sure to change the Colab\nruntime to \u201cGPU\u201d to have it run fast!) See the fast.ai documentation on\n[Using Colab](https://course.fast.ai/start_colab) for more information.\n\nYou can install fastai on your own machines with conda (highly\nrecommended), as long as you\u2019re running Linux or Windows (NB: Mac is not\nsupported). For Windows, please see the \u201cRunning on Windows\u201d for\nimportant notes.\n\nWe recommend using\n[miniconda](https://docs.conda.io/en/latest/miniconda.html) (or\nminiforge). First install PyTorch using the conda line shown\n[here](https://pytorch.org/get-started/locally/), and then run:\n\n``` bash\nconda install -c fastai fastai\n```\n\nTo install with pip, use: `pip install fastai`.\n\nIf you plan to develop fastai yourself, or want to be on the cutting\nedge, you can use an editable install (if you do this, you should also\nuse an editable install of\n[fastcore](https://github.com/fastai/fastcore) to go with it.) First\ninstall PyTorch, and then:\n\n    git clone https://github.com/fastai/fastai\n    pip install -e \"fastai[dev]\"\n\n## Learning fastai\n\nThe best way to get started with fastai (and deep learning) is to read\n[the\nbook](https://www.amazon.com/Deep-Learning-Coders-fastai-PyTorch/dp/1492045527),\nand complete [the free course](https://course.fast.ai).\n\nTo see what\u2019s possible with fastai, take a look at the [Quick\nStart](https://docs.fast.ai/quick_start.html), which shows how to use\naround 5 lines of code to build an image classifier, an image\nsegmentation model, a text sentiment model, a recommendation system, and\na tabular model. For each of the applications, the code is much the\nsame.\n\nRead through the [Tutorials](https://docs.fast.ai/tutorial.html) to\nlearn how to train your own models on your own datasets. Use the\nnavigation sidebar to look through the fastai documentation. Every\nclass, function, and method is documented here.\n\nTo learn about the design and motivation of the library, read the [peer\nreviewed paper](https://www.mdpi.com/2078-2489/11/2/108/htm).\n\n## About fastai\n\nfastai is a deep learning library which provides practitioners with\nhigh-level components that can quickly and easily provide\nstate-of-the-art results in standard deep learning domains, and provides\nresearchers with low-level components that can be mixed and matched to\nbuild new approaches. It aims to do both things without substantial\ncompromises in ease of use, flexibility, or performance. This is\npossible thanks to a carefully layered architecture, which expresses\ncommon underlying patterns of many deep learning and data processing\ntechniques in terms of decoupled abstractions. These abstractions can be\nexpressed concisely and clearly by leveraging the dynamism of the\nunderlying Python language and the flexibility of the PyTorch library.\nfastai includes:\n\n- A new type dispatch system for Python along with a semantic type\n  hierarchy for tensors\n- A GPU-optimized computer vision library which can be extended in pure\n  Python\n- An optimizer which refactors out the common functionality of modern\n  optimizers into two basic pieces, allowing optimization algorithms to\n  be implemented in 4\u20135 lines of code\n- A novel 2-way callback system that can access any part of the data,\n  model, or optimizer and change it at any point during training\n- A new data block API\n- And much more\u2026\n\nfastai is organized around two main design goals: to be approachable and\nrapidly productive, while also being deeply hackable and configurable.\nIt is built on top of a hierarchy of lower-level APIs which provide\ncomposable building blocks. This way, a user wanting to rewrite part of\nthe high-level API or add particular behavior to suit their needs does\nnot have to learn how to use the lowest level.\n\n<img alt=\"Layered API\" src=\"https://raw.githubusercontent.com/fastai/fastai/master/images/layered.png\" width=\"345\">\n\n## Migrating from other libraries\n\nIt\u2019s very easy to migrate from plain PyTorch, Ignite, or any other\nPyTorch-based library, or even to use fastai in conjunction with other\nlibraries. Generally, you\u2019ll be able to use all your existing data\nprocessing code, but will be able to reduce the amount of code you\nrequire for training, and more easily take advantage of modern best\npractices. Here are migration guides from some popular libraries to help\nyou on your way:\n\n- [Plain PyTorch](https://docs.fast.ai/examples/migrating_pytorch.html)\n- [Ignite](https://docs.fast.ai/examples/migrating_ignite.html)\n- [Lightning](https://docs.fast.ai/examples/migrating_lightning.html)\n- [Catalyst](https://docs.fast.ai/examples/migrating_catalyst.html)\n\n## Windows Support\n\nDue to python multiprocessing issues on Jupyter and Windows,\n`num_workers` of `Dataloader` is reset to 0 automatically to avoid\nJupyter hanging. This makes tasks such as computer vision in Jupyter on\nWindows many times slower than on Linux. This limitation doesn\u2019t exist\nif you use fastai from a script.\n\nSee [this\nexample](https://github.com/fastai/fastai/blob/master/nbs/examples/dataloader_spawn.py)\nto fully leverage the fastai API on Windows.\n\nWe recommend using Windows Subsystem for Linux (WSL) instead \u2013 if you do\nthat, you can use the regular Linux installation approach, and you won\u2019t\nhave any issues with `num_workers`.\n\n## Tests\n\nTo run the tests in parallel, launch:\n\n`nbdev_test`\n\nFor all the tests to pass, you\u2019ll need to install the dependencies\nspecified as part of dev_requirements in settings.ini\n\n`pip install -e .[dev]`\n\nTests are written using `nbdev`, for example see the documentation for\n`test_eq`.\n\n## Contributing\n\nAfter you clone this repository, make sure you have run\n`nbdev_install_hooks` in your terminal. This install Jupyter and git\nhooks to automatically clean, trust, and fix merge conflicts in\nnotebooks.\n\nAfter making changes in the repo, you should run `nbdev_prepare` and\nmake additional and necessary changes in order to pass all the tests.\n\n## Docker Containers\n\nFor those interested in official docker containers for this project,\nthey can be found\n[here](https://github.com/fastai/docker-containers#fastai).\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "fastai simplifies training fast and accurate neural nets using modern best practices",
    "version": "2.7.18",
    "project_urls": {
        "Homepage": "https://github.com/fastai/fastai"
    },
    "split_keywords": [
        "fastai",
        " deep learning",
        " machine learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f8817df1ed81c1004c6705b666652a467822b819411858b21e1c174ceaf6d464",
                "md5": "8662bb7bec3048fa5e9dfbef68dd8cf2",
                "sha256": "6bf89b9f7ea7318ce8c1334a7d7a63b4551703fa0f09e3f74fcee89e0769446d"
            },
            "downloads": -1,
            "filename": "fastai-2.7.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8662bb7bec3048fa5e9dfbef68dd8cf2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 234470,
            "upload_time": "2024-10-19T03:20:25",
            "upload_time_iso_8601": "2024-10-19T03:20:25.685242Z",
            "url": "https://files.pythonhosted.org/packages/f8/81/7df1ed81c1004c6705b666652a467822b819411858b21e1c174ceaf6d464/fastai-2.7.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fa9af086598db4f30447534bc687d4f90ab77c5382fa242d36d6c79db75e39d5",
                "md5": "5523118b19f6b4cdda5832c03551be66",
                "sha256": "b20593dbcae7522f1d77a8f5163d1fd60314f292640496804dc356e41cb36454"
            },
            "downloads": -1,
            "filename": "fastai-2.7.18.tar.gz",
            "has_sig": false,
            "md5_digest": "5523118b19f6b4cdda5832c03551be66",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 216124,
            "upload_time": "2024-10-19T03:20:28",
            "upload_time_iso_8601": "2024-10-19T03:20:28.059101Z",
            "url": "https://files.pythonhosted.org/packages/fa/9a/f086598db4f30447534bc687d4f90ab77c5382fa242d36d6c79db75e39d5/fastai-2.7.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 03:20:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fastai",
    "github_project": "fastai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fastai"
}
        
Elapsed time: 0.87679s