Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit f9bbd84
Author: st-- <[email protected]>
Date:   Fri Jan 28 09:11:50 2022 +0100

    make nystrom work with AbstractVector (#427)

    * make nystrom work with AbstractVector

    * add test

    * Update test/approximations/nystrom.jl

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * patch bump

    * Update test/approximations/nystrom.jl

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * Apply suggestions from code review

    Co-authored-by: David Widmann <[email protected]>

    * Apply suggestions from code review

    * deprecate

    * Apply suggestions from code review

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * Apply suggestions from code review

    Co-authored-by: David Widmann <[email protected]>

    * Apply suggestions from code review

    Co-authored-by: Théo Galy-Fajou <[email protected]>

    * Update src/approximations/nystrom.jl

    Co-authored-by: Théo Galy-Fajou <[email protected]>

    * Update src/approximations/nystrom.jl

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: David Widmann <[email protected]>
    Co-authored-by: Théo Galy-Fajou <[email protected]>

commit d1c68a9
Author: st-- <[email protected]>
Date:   Thu Jan 13 22:33:43 2022 +0100

    fix Distances compat (#423)

    * CompatHelper: bump compat for Distances to 0.10 for package test, (keep existing compat)

    * try out Theo's fix

    * fix test compat

    * use ForwardDiff for chain rule test of SqMahalanobis

    * test on 1.4 instead of 1.3 - see if the chainrules test passes there

    * revert version branch

    * revert to 1.3

    * test_broken for older Julia versions

    Co-authored-by: CompatHelper Julia <[email protected]>

commit 93d33c2
Author: st-- <[email protected]>
Date:   Wed Jan 12 14:11:14 2022 +0100

    fix figure & cleanup (#422)

    * fix figure & cleanup

    * bump LIBSVM compat & Manifest

    * improve writing, replaces #321

commit 40cb59e
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Wed Jan 12 09:39:01 2022 +0200

    CompatHelper: bump compat for Kronecker to 0.5 for package docs, (keep existing compat) (#367)

    * CompatHelper: bump compat for Kronecker to 0.5 for package docs, (keep existing compat)

    * ] up

    Co-authored-by: CompatHelper Julia <[email protected]>
    Co-authored-by: st-- <[email protected]>

commit 7204529
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Tue Jan 11 18:37:23 2022 +0200

    CompatHelper: bump compat for Kronecker to 0.5 for package test, (keep existing compat) (#366)

    Co-authored-by: CompatHelper Julia <[email protected]>
    Co-authored-by: st-- <[email protected]>

commit 924925d
Author: st-- <[email protected]>
Date:   Tue Jan 11 16:26:02 2022 +0100

    switch SVM example to half-moon dataset (#421)

commit 992b665
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Fri Dec 24 12:18:56 2021 +0200

    CompatHelper: bump compat for SpecialFunctions to 2 for package test, (keep existing compat) (#412)

    Co-authored-by: CompatHelper Julia <[email protected]>
    Co-authored-by: Théo Galy-Fajou <[email protected]>
    Co-authored-by: st-- <[email protected]>

commit 04fa7f7
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Dec 23 13:33:59 2021 +0200

    CompatHelper: bump compat for SpecialFunctions to 2, (keep existing compat) (#411)

    Co-authored-by: CompatHelper Julia <[email protected]>
    Co-authored-by: Théo Galy-Fajou <[email protected]>
    Co-authored-by: st-- <[email protected]>

commit c0fc3e1
Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Thu Dec 23 01:10:40 2021 +0200

    CompatHelper: add new compat entry for Compat at version 3 for package test, (keep existing compat) (#418)

    Co-authored-by: CompatHelper Julia <[email protected]>

commit 05fe340
Author: st-- <[email protected]>
Date:   Tue Dec 21 00:49:37 2021 +0200

    use only() instead of first() (#403)

    * use only() instead of first() for 1-"vectors" that were for the benefit of Flux

    * fix one test that should not have worked as it was

    * add missing scalar Sinus constructor

commit 2d17212
Author: st-- <[email protected]>
Date:   Sat Dec 18 23:43:30 2021 +0200

    Zygote AD failure workarounds & test cleanup (#414)

    Zygote AD failures:

    * revert #409 (test_utils workaround for broken Zygote - now working again)

    * disable broken Zygote AD test for ChainTransform

    Improved tests:

    * finer-grained testsets

    * add missing test cases to test_AD

    * replace test_FiniteDiff with test_AD(..., :FiniteDiff, ...)

    * remove code duplication

commit 3c49949
Author: Théo Galy-Fajou <[email protected]>
Date:   Wed Nov 24 18:32:19 2021 +0100

    Fix typo in valid_inputs error (#408)

    * Fix typo in valid_inputs error

    * Update src/utils.jl

    Co-authored-by: David Widmann <[email protected]>

    Co-authored-by: David Widmann <[email protected]>

commit 9955044
Author: st-- <[email protected]>
Date:   Wed Nov 24 18:55:18 2021 +0200

    Fix for Zygote 0.6.30 breaking our tests (#409)

    * restrict Zygote to <0.6.30

    * revert Zygote test restriction and add finer-grained testset

    * Update test/utils.jl

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * revert testset

    * mark test_broken

    * Use `@test_throws` instead of `@test_broken`

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    Co-authored-by: David Widmann <[email protected]>

commit 33d64d1
Author: Théo Galy-Fajou <[email protected]>
Date:   Thu Nov 4 14:23:57 2021 +0100

    Add benchmarking CI (#399)

    * Add benchmark file

    * delete old benchmarks

    * Add github action

    * Add Project

    * Apply suggestions from code review

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

    * Missing end of line

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

commit 360ce10
Author: David Widmann <[email protected]>
Date:   Tue Nov 2 11:09:58 2021 +0100

    Update docstring of `GibbsKernel` (#395)
  • Loading branch information
Crown421 committed Jan 28, 2022
1 parent 20a9819 commit 98c6913
Show file tree
Hide file tree
Showing 37 changed files with 527 additions and 486 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run benchmarks

on:
pull_request:

jobs:
Benchmark:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'performance critical')
env:
JULIA_DEBUG: BenchmarkCI
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1.6
- name: Install dependencies
run: julia -e 'using Pkg; pkg"add PkgBenchmark BenchmarkCI"'
- name: Run benchmarks
run: julia -e "using BenchmarkCI; BenchmarkCI.judge()"
- name: Post results
run: julia -e "using BenchmarkCI; BenchmarkCI.postjudge()"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/test/Manifest.toml
coverage/
.DS_store
benchmark/Manifest.toml
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "KernelFunctions"
uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
version = "0.10.26"
version = "0.10.28"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down Expand Up @@ -30,7 +30,7 @@ Functors = "0.1, 0.2"
IrrationalConstants = "0.1"
LogExpFunctions = "0.2.1, 0.3"
Requires = "1.0.1"
SpecialFunctions = "0.8, 0.9, 0.10, 1"
SpecialFunctions = "0.8, 0.9, 0.10, 1, 2"
StatsBase = "0.32, 0.33"
TensorCore = "0.1"
ZygoteRules = "0.2"
Expand Down
22 changes: 0 additions & 22 deletions benchmark/MLKernels.jl

This file was deleted.

3 changes: 3 additions & 0 deletions benchmark/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
KernelFunctions = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
55 changes: 39 additions & 16 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
@@ -1,23 +1,46 @@
using BenchmarkTools
using Random
using Distances, LinearAlgebra
using KernelFunctions

const SUITE = BenchmarkGroup()
N1 = 10
N2 = 20

Random.seed!(1234)
X = rand(N1, N2)
Xc = ColVecs(X)
Xr = RowVecs(X)
Xv = collect.(eachcol(X))
Y = rand(N1, N2)
Yc = ColVecs(Y)
Yr = RowVecs(Y)
Yv = collect.(eachcol(Y))

dim = 50
N1 = 1000;
N2 = 500;
alpha = 2.0
# Create the general suite of benchmarks
SUITE = BenchmarkGroup()

X = rand(Float64, N1, dim)
Y = rand(Float64, N2, dim)
kernels = Dict(
"SqExponential" => SqExponentialKernel(), "Exponential" => ExponentialKernel()
)

KXY = rand(Float64, N1, N2)
KX = rand(Float64, N1, N1)
sKX = Symmetric(rand(Float64, N1, N1))
kX = rand(Float64, N1)
inputtypes = Dict("ColVecs" => (Xc, Yc), "RowVecs" => (Xr, Yr), "Vecs" => (Xv, Yv))

include("kernelmatrix.jl")
include("MLKernels.jl")
functions = Dict(
"kernelmatrixX" => (kernel, X, Y) -> kernelmatrix(kernel, X),
"kernelmatrixXY" => (kernel, X, Y) -> kernelmatrix(kernel, X, Y),
"kernelmatrix_diagX" => (kernel, X, Y) -> kernelmatrix_diag(kernel, X),
"kernelmatrix_diagXY" => (kernel, X, Y) -> kernelmatrix_diag(kernel, X, Y),
)

for (kname, kernel) in kernels
SUITE[kname] = sk = BenchmarkGroup()
for (inputname, (X, Y)) in inputtypes
sk[inputname] = si = BenchmarkGroup()
for (fname, f) in functions
si[fname] = @benchmarkable $f($kernel, $X, $Y)
end
end
end

# Uncomment the following to run benchmark locally

# tune!(SUITE)

# results = run(SUITE, verbose=true)
39 changes: 0 additions & 39 deletions benchmark/kernelmatrix.jl

This file was deleted.

Loading

0 comments on commit 98c6913

Please sign in to comment.