Skip to content

Commit

Permalink
Release v0.2.0 (#174)
Browse files Browse the repository at this point in the history
* Improve links in tabular tutorial

* bump version

* add more links to Changelog

* fix method finding bug
  • Loading branch information
lorenzoh authored Sep 20, 2021
1 parent ea6c096 commit 72cd976
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - 2020-07-32 – now
## 0.2.0

### Added

- High-level API "FasterAI"
- dataset recipes
- learning method helpers
- Find datasets and learning methods based on `Block`s: `finddataset`, `findlearningmethods`
- `loaddataset` for quickly loading data containers from configured recipes
- Find datasets and learning methods based on `Block`s: [`finddatasets`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.Datasets.Datasets.finddatasets.html), [`findlearningmethods`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.findlearningmethods.html)
- [`loaddataset`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.Datasets.Datasets.loaddataset.html) for quickly loading data containers from configured recipes
- Data container recipes (`DatasetRecipe`, `loadrecipe`)
- Documentation setions for FasterAI interfaces:
- [Discovery](https://fluxml.ai/FastAI.jl/dev/docs/discovery.md.html)
- [Blocks and encodings](https://fluxml.ai/FastAI.jl/dev/docs/background/blocksencodings.md.html)
- New interfaces
- `blockbackbone` creates a default backbone for an input block
- Support for tabular data along with recipes and learning methods:
- [`TabularPreprocessing`], [`TableRow`], [`TableDataset`], [`TabularClassificiationSingle`], [`TabularRegression`]
- [Tabular classification tutorial](https://fluxml.ai/FastAI.jl/dev/notebooks/tabularclassification.ipynb.html)
- [`TabularPreprocessing`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.TabularPreprocessing.html), [`TableRow`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.TableRow.html), [`TableDataset`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.Datasets.TableDataset.html), [`TabularClassificiationSingle`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.TabularClassificationSingle.html), [`TabularRegression`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.TabularRegression.html)


### Changed
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FastAI"
uuid = "5d0beca9-ade8-49ae-ad0b-a3cf890e669f"
authors = ["Lorenz Ohly", "Julia Community"]
version = "0.1.0"
version = "0.2.0"

[deps]
Animations = "27a7e980-b3e6-11e9-2bcd-0b925532e340"
Expand Down
26 changes: 13 additions & 13 deletions notebooks/tabularclassification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"id": "19f9ec64",
"metadata": {},
"source": [
"We can quickly download and get the path of any dataset from fastai by using `datasetpath`. Once we have the path, we'll load the data in a `TableContainer`. By default, if we pass in just the path to `TableContainer`, the data is loaded in a `DataFrame`, but we can use any package for accessing our data, and pass an object satisfying the Tables.jl interface to it."
"We can quickly download and get the path of any dataset from fastai by using [`datasetpath`](#). Once we have the path, we'll load the data in a [`TableDataset`](#). By default, if we pass in just the path to [`TableDataset`](#), the data is loaded in a `DataFrame`, but we can use any package for accessing our data, and pass an object satisfying the [Tables.jl](https://github.com/JuliaData/Tables.jl) interface to it."
]
},
{
Expand Down Expand Up @@ -91,7 +91,7 @@
"id": "bd63b82d",
"metadata": {},
"source": [
"In case our data was present in a different format for eg. parquet, it could be loaded in a TableContainer as shown below."
"In case our data was present in a different format for eg. parquet, it could be loaded into a data container as follows:"
]
},
{
Expand All @@ -110,7 +110,7 @@
"id": "a77c191c",
"metadata": {},
"source": [
"`mapobs` is used here to split our target column from the rest of the row in a lazy manner."
"[`mapobs`](#) is used here to split our target column from the rest of the row in a lazy manner, so that each observation consists of a row of inputs and a target variable."
]
},
{
Expand All @@ -130,11 +130,11 @@
"source": [
"To create a learning method for tabular classification task, we need an input block, an output block, and the encodings to be performed on the data.\n",
"\n",
"The input block here is a `TableRow` which contains information about the nature of the columns (ie. categorical or continuous) along with an indexable collection mapping categorical column names to a collection with distinct classes in that column. We can get this mapping by using the `gettransformationdict` method with `DataAugmentation.Categorify`.\n",
"The input block here is a [`TableRow`](#) which contains information about the nature of the columns (ie. categorical or continuous) along with an indexable collection mapping categorical column names to a collection with distinct classes in that column. We can get this mapping by using the `gettransformationdict` method with [`DataAugmentation.Categorify`](#).\n",
"\n",
"The outblock block used is `Label` for single column classification and the unique classes have to passed to it.\n",
"The outblock block used is [`Label`](#) for single column classification and the unique classes have to passed to it.\n",
"\n",
"This is followed by the encodings which needs to be applied on our input and output blocks. For the input block, we have used the `gettransforms` function here to get a standard bunch of transformations to apply, but this can be easily customized by passing in any tabular transformation from DataAugmentation.jl or a composition of those, to `TabularPreprocessings`. In addition to this, we have just one-hot encoded the outblock."
"This is followed by the encodings which needs to be applied on our input and output blocks. For the input block, we have used the `gettransforms` function here to get a standard bunch of transformations to apply, but this can be easily customized by passing in any tabular transformation from DataAugmentation.jl or a composition of those, to [`TabularPreprocessing`](#). In addition to this, we have just one-hot encoded the outblock."
]
},
{
Expand Down Expand Up @@ -193,7 +193,7 @@
"id": "ad69519e",
"metadata": {},
"source": [
"In case our initial problem wasn't a classification task, and we had a continuous target column, we would need to perform tabular regression. To create a learning method suitable for regression, we use a `Continuous` block for representing our target column. This can be done even with multiple continuous target columns by just passing the number of columns in `Continuous`. For example, the method here could be used for 3 targets."
"In case our initial problem wasn't a classification task, and we had a continuous target column, we would need to perform tabular regression. To create a learning method suitable for regression, we use a [`Continuous`](#) block for representing our target column. This can be done even with multiple continuous target columns by just passing the number of columns in `Continuous`. For example, the method here could be used for 3 targets."
]
},
{
Expand All @@ -218,7 +218,7 @@
"id": "5a1d9474",
"metadata": {},
"source": [
"To get an overview of the learning method created, and as a sanity test, we can use the `describemethod` function. This shows us what encodings will be applied to which blocks, and how the predicted ŷ values are decoded."
"To get an overview of the learning method created, and as a sanity test, we can use [`describemethod`](#). This shows us what encodings will be applied to which blocks, and how the predicted ŷ values are decoded."
]
},
{
Expand Down Expand Up @@ -321,7 +321,7 @@
"id": "bb9da109",
"metadata": {},
"source": [
"`getobs` gets us a row of data from the `TableContainer`, which we encode here. This gives us a tuple with the input and target. The input here is again a tuple, containing the categorical values (which have been label encoded or \"categorified\") and the continuous values (which have been normalized and any missing values have been filled). "
"`getobs` gets us a row of data from the `TableDataset`, which we encode here. This gives us a tuple with the input and target. The input here is again a tuple, containing the categorical values (which have been label encoded or \"categorified\") and the continuous values (which have been normalized and any missing values have been filled). "
]
},
{
Expand Down Expand Up @@ -376,7 +376,7 @@
"id": "b7105af7",
"metadata": {},
"source": [
"To quickly get a model suitable for our learning method, we can use the `methodmodel` function."
"To get a model suitable for our learning method, we can use [`methodmodel`](#) which constructs a suitable model based on the target block. "
]
},
{
Expand Down Expand Up @@ -436,7 +436,7 @@
"id": "0fb73fd4",
"metadata": {},
"source": [
"It is really simple to create a custom backbone using the functions present in `FastAI.Models`."
"Of course you can also create a custom backbone using the functions present in `FastAI.Models`."
]
},
{
Expand Down Expand Up @@ -521,7 +521,7 @@
"id": "22eb6dc7",
"metadata": {},
"source": [
"To directly get a `Learner` suitable for our method and data, we can use the `methodlearner` function. "
"To directly get a [`Learner`](#) suitable for our method and data, we can use the [`methodlearner`](#) function. This creates both batched data loaders and a model for us."
]
},
{
Expand Down Expand Up @@ -552,7 +552,7 @@
"id": "d5b4b0be",
"metadata": {},
"source": [
"Once we have our learner, we can just call [`fitonecycle!`](#) on it to train it for the desired number of epochs."
"Once we have a `Learner`, we can call [`fitonecycle!`](#) on it to train it for the desired number of epochs:"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/fasterai/methodregistry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ julia> findlearningmethods((Image, Any))
```
"""
function findlearningmethods(reg::LearningMethodRegistry, blocktypes=Any)
return [methodfn for (methodfn, methodblocks) in reg.methods if typify(blocktypes) <: methodblocks]
return [methodfn for (methodfn, methodblocks) in reg.methods if methodblocks <: typify(blocktypes)]
end


Expand Down

0 comments on commit 72cd976

Please sign in to comment.