Skip to content

Commit

Permalink
Move domain-specific functionality to subpackages (#240)
Browse files Browse the repository at this point in the history
* Move domain-specific functionality to subpackages

* Add FastMakie.jl

* Update tests

* Add subpackage CI

* run SciMLStyle

* Add sysimage example

* Update documentation

* Rerun notebooks
  • Loading branch information
lorenzoh committed Jul 3, 2022
1 parent d432f41 commit c0cbc53
Show file tree
Hide file tree
Showing 166 changed files with 7,438 additions and 7,419 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci-fastmakie.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI - FastMakie
on:
push:
paths-ignore:
- 'docs/**'
- 'FastTabular/**'
- 'FastText/**'
- 'FastVision/**'
- '*.md'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Dev FastAI
run: |
julia --color=yes --project=./FastMakie -e 'using Pkg; pkg"dev ."'
shell: bash
- name: Dev test dependencies
run: |
julia --color=yes --project=./FastMakie/test -e 'using Pkg; pkg"dev . ./FastMakie "'
shell: bash
- uses: julia-actions/julia-buildpkg@latest
with:
project: './FastMakie/'
- name: Run tests
run: |
julia --color=yes --depwarn=yes --project=./FastMakie/test -e 'include("FastMakie/test/runtests.jl")'
continue-on-error: ${{ matrix.version == 'nightly' }}
shell: bash
56 changes: 56 additions & 0 deletions .github/workflows/ci-fasttabular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI - FastTabular
on:
push:
paths-ignore:
- 'docs/**'
- 'FastMakie/**'
- 'FastText/**'
- 'FastVision/**'
- '*.md'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
os:
- ubuntu-latest
- macOS-latest
arch:
- x64

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Dev FastAI
run: |
julia --color=yes --project=./FastTabular -e 'using Pkg; pkg"dev ."'
shell: bash
- name: Dev test dependencies
run: |
julia --color=yes --project=./FastTabular/test -e 'using Pkg; pkg"dev . ./FastTabular "'
shell: bash
- uses: julia-actions/julia-buildpkg@latest
with:
project: './FastTabular/'
- name: Run tests
run: |
julia --color=yes --depwarn=yes --project=./FastTabular/test -e 'include("FastTabular/test/runtests.jl")'
continue-on-error: ${{ matrix.version == 'nightly' }}
shell: bash
57 changes: 57 additions & 0 deletions .github/workflows/ci-fasttext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI - FastText
on:
push:
paths-ignore:
- 'docs/**'
- 'FastMakie/**'
- 'FastTabular/**'
- 'FastVision/**'
- '*.md'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Dev FastAI
run: |
julia --color=yes --project=./FastText -e 'using Pkg; pkg"dev ."'
shell: bash
- name: Dev test dependencies
run: |
julia --color=yes --project=./FastText/test -e 'using Pkg; pkg"dev . ./FastText "'
shell: bash
- uses: julia-actions/julia-buildpkg@latest
with:
project: './FastText/'
- name: Run tests
run: |
julia --color=yes --depwarn=yes --project=./FastText/test -e 'include("FastText/test/runtests.jl")'
continue-on-error: ${{ matrix.version == 'nightly' }}
shell: bash
61 changes: 61 additions & 0 deletions .github/workflows/ci-fastvision.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI - FastVision
on:
push:
paths-ignore:
- 'docs/**'
- 'FastTabular/**'
- 'FastText/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'FastTabular/**'
- 'FastText/**'
- '*.md'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6'
os:
- ubuntu-latest
- macOS-latest
arch:
- x64

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Dev FastAI
run: |
julia --color=yes --project=./FastVision -e 'using Pkg; pkg"dev ."'
shell: bash
- name: Dev test dependencies
run: |
julia --color=yes --project=./FastVision/test -e 'using Pkg; pkg"dev . ./FastVision ./FastMakie"'
shell: bash
- uses: julia-actions/julia-buildpkg@latest
with:
project: './FastVision/'
- name: Run tests
run: |
julia --color=yes --depwarn=yes --project=./FastVision/test -e 'include("FastVision/test/runtests.jl")'
continue-on-error: ${{ matrix.version == 'nightly' }}
shell: bash
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
name: CI
on:
- push
- pull_request
push:
paths-ignore:
- 'docs/**'
- 'FastMakie/**'
- 'FastVision/**'
- 'FastTabular/**'
- 'FastText/**'
- '*.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'FastMakie/**'
- 'FastVision/**'
- 'FastTabular/**'
- 'FastText/**'
- '*.md'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pollenbuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pollenbuild
name: Documentation - Build

on:
push:
Expand All @@ -19,7 +19,7 @@ jobs:
version: '1.7'
- name: "Install package and docs dependencies"
run: |
julia --color=yes --project=./docs -e 'using Pkg; Pkg.add([Pkg.PackageSpec(path="."), Pkg.PackageSpec(url="https://github.com/c42f/JuliaSyntax.jl"), Pkg.PackageSpec(url="https://github.com/lorenzoh/ModuleInfo.jl"), Pkg.PackageSpec(url="https://github.com/lorenzoh/Pollen.jl", rev="main")]); Pkg.instantiate();'
julia --color=yes --project=./docs -e 'using Pkg; pkg"dev . ./FastVision ./FastMakie ./FastTabular https://github.com/c42f/JuliaSyntax.jl https://github.com/lorenzoh/ModuleInfo.jl https://github.com/lorenzoh/Pollen.jl"; Pkg.instantiate();'
- name: Build
run: |
julia --color=yes --project=./docs ./docs/make.jl ./pollen/dev/
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/pollenpr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Documentation - PR

on:
- pr

jobs:
pollen:
name: "Pollen - test documentation build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
ref: pollen
path: pollen
- uses: julia-actions/setup-julia@latest
with:
version: '1.7'
- name: "Install package and docs dependencies"
run: |
julia --color=yes --project=./docs -e 'using Pkg; pkg"dev . ./FastVision ./FastMakie ./FastTabular https://github.com/c42f/JuliaSyntax.jl https://github.com/lorenzoh/ModuleInfo.jl https://github.com/lorenzoh/Pollen.jl"; Pkg.instantiate();'
- name: Build
run: |
julia --color=yes --project=./docs ./docs/make.jl ./pollen/dev/
- name: Deploy
run: |
cd pollen
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Build documentation data (Pollen.jl)"
git push
2 changes: 1 addition & 1 deletion .github/workflows/pollenstatic.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pollenstatic
name: Documentation - Deploy

on:
push:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ test/Manifest.toml
docs/Manifest.toml
development/**
Manifest.toml
**/*.jld2
**/*.jld2
*.so
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- (BREAKING) Now uses [MLUtils.jl](https://github.com/JuliaML/MLUtils.jl) to create and load datasets and data containers
- (BREAKING): Now uses [MLUtils.jl](https://github.com/JuliaML/MLUtils.jl) to create and load datasets and data containers
- Replaces dependencies MLDataPattern.jl, LearnBase.jl, and DataLoaders.jl
- Data containers must now implement the `Base.getindex`/`MLUtils.getobs` and `Base.length`/`MLUtils.numobs` interfaces.
- Previously exported `MLDataPattern.datasubset` has been replaced by `MLUtils.ObsView`
- Documentation has been updated appropriately

- (BREAKING): `FastAI.Vision` now lives in a separate package `FastVision` that holds all computer vision-related functionality.
- (BREAKING): `FastAI.Tabular` now lives in a separate package `FastTabular` that holds all tabular data-related functionality.

### Removed

- (BREAKING): `FastAI.Models` submodule. `Models` submodule of domain libraries, e.g. `FastVision.Models` should now be used.

## v0.4.3 (2022/05/14)

Expand Down Expand Up @@ -105,7 +110,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New interfaces
- `blockbackbone` creates a default backbone for an input block
- Support for tabular data along with recipes and learning methods:
- [Tabular classification tutorial](https://fluxml.ai/FastAI.jl/dev/notebooks/tabularclassification.ipynb.html)
- [Tabular classification tutorial](https://fluxml.ai/FastAI.jl/dev/docs/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)


Expand All @@ -115,7 +120,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [README](https://fluxml.ai/FastAI.jl/dev/README.md.html)
- [Introduction](https://fluxml.ai/FastAI.jl/dev/docs/introduction.md.html)
- [Data containers](https://fluxml.ai/FastAI.jl/dev/docs/data_containers.md.html)
- Combined how-tos on training [into a single page](https://fluxml.ai/FastAI.jl/dev/notebooks/training.ipynb.html)
- Combined how-tos on training [into a single page](https://fluxml.ai/FastAI.jl/dev/docs/notebooks/training.ipynb.html)
- Breaking changes to [`methodlearner`](https://fluxml.ai/FastAI.jl/dev/REFERENCE/FastAI.methodlearner.html):
- now accepts `callbacks` as kwarg
- `validdata` no longer keyword
Expand Down
14 changes: 14 additions & 0 deletions FastMakie/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name = "FastMakie"
uuid = "ca994201-3d74-4fad-8816-f8bc5449c7c3"
authors = ["Lorenz Ohly", "Julia Community"]
version = "0.1.0"

[deps]
FastAI = "5d0beca9-ade8-49ae-ad0b-a3cf890e669f"
InlineTest = "bd334432-b1e7-49c7-a2dc-dd9149e4ebd6"
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"

[compat]
FastAI = "0.5"
Makie = "0.17"
21 changes: 21 additions & 0 deletions FastMakie/src/FastMakie.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module FastMakie

import FastAI: FastAI, createhandle, showblock!, AbstractBlock, OneHotTensor,
OneHotTensorMulti,
Label, LabelMulti, ShowBackend, ShowMakie, axiskwargs, showblock,
showblocks!, showblocks
using InlineTest
import Makie
import NNlib: softmax, sigmoid

include("axis.jl")
include("showmakie.jl")
include("blocks.jl")
include("lrfind.jl")

function __init__()
# When loaded, set default show backend
FastAI.SHOW_BACKEND[] = ShowMakie()
end

end
Loading

0 comments on commit c0cbc53

Please sign in to comment.