Skip to content

Commit

Permalink
aqua
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed Aug 5, 2023
1 parent 17e46b1 commit 3f84b62
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 33 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ jobs:
version:
- '1.7'
- '1.8'
- '1'
#- 'nightly'
- '1.9'
os:
- ubuntu-latest
- macOS-latest
Expand All @@ -29,9 +28,4 @@ jobs:
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
files: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RestrictedBoltzmannMachines"
uuid = "12e6b396-7db5-4506-8cb6-664a4fe1e50e"
authors = ["Jorge Fernandez-de-Cossio-Diaz <[email protected]>"]
version = "3.2.0"
version = "3.2.1"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand All @@ -21,6 +21,6 @@ DiffRules = "1.8"
EllipsisNotation = "1"
FillArrays = "0.12, 0.13, 1"
LogExpFunctions = "0.3"
SpecialFunctions = "2"
Optimisers = "0.2"
SpecialFunctions = "2"
julia = "1.7"
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
# RestrictedBoltzmannMachines Julia package

[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/cossio/RestrictedBoltzmannMachines.jl/blob/master/LICENSE.md)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://cossio.github.io/RestrictedBoltzmannMachines.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://cossio.github.io/RestrictedBoltzmannMachines.jl/dev)
![](https://github.com/cossio/RestrictedBoltzmannMachines.jl/workflows/CI/badge.svg)
[![codecov](https://codecov.io/gh/cossio/RestrictedBoltzmannMachines.jl/branch/master/graph/badge.svg?token=O5P8LQTVF3)](https://codecov.io/gh/cossio/RestrictedBoltzmannMachines.jl)

Train and sample [Restricted Boltzmann machines](https://en.wikipedia.org/wiki/Restricted_Boltzmann_machine) in Julia.
See the [Documentation](https://cossio.github.io/RestrictedBoltzmannMachines.jl/stable) for details.

## Installation

Expand Down
3 changes: 3 additions & 0 deletions example/frozen_weights.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using RestrictedBoltzmannMachines: RBM, pcd!, Binary

rbm = RBM(Binary(; θ=zeros(5)), Binary(; θ=zeros(3)), randn(5,3))
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
Expand All @@ -19,4 +20,5 @@ ValueHistories = "98cad3c8-aec3-5f06-8e41-884608649ab7"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
Aqua = "0.6"
Distributions = "≥ 0.25"
12 changes: 12 additions & 0 deletions test/aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Aqua
import RestrictedBoltzmannMachines

using Test: @testset

@testset "aqua" begin
Aqua.test_all(
RestrictedBoltzmannMachines;
stale_deps=(ignore=[:DiffRules],),
ambiguities=(recursive=false, exclude=[reshape])
)
end
36 changes: 19 additions & 17 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
using SafeTestsets: @safetestset

@time @safetestset "util" begin include("util.jl") end
@time @safetestset "linalg" begin include("linalg.jl") end
@time @safetestset "onehot" begin include("onehot.jl") end
@time @safetestset "rbm" begin include("rbm.jl") end
@time @safetestset "layers" begin include("layers.jl") end
@time @safetestset "pseudolikelihood" begin include("pseudolikelihood.jl") end
#@time @safetestset "minibatches" begin include("minibatches.jl") end
@time @safetestset "infinite_minibatches" begin include("infinite_minibatches.jl") end
@time @safetestset "initialization" begin include("initialization.jl") end
@time @safetestset "regularize" begin include("regularize.jl") end
@time @safetestset "truncnorm" begin include("truncnorm.jl") end
@time @safetestset "optim" begin include("optim.jl") end
@time @safetestset "partition" begin include("partition.jl") end
@time @safetestset "metropolis" begin include("metropolis.jl") end
module util_tests include("util.jl") end
module linalg_tests include("linalg.jl") end
module onehot_tests include("onehot.jl") end
module rbm_tests include("rbm.jl") end
module layers_tests include("layers.jl") end
module pseudolikelihood_tests include("pseudolikelihood.jl") end
# module minibatches include("minibatches.jl") end
module infinite_minibatches_tests include("infinite_minibatches.jl") end
module initialization_tests include("initialization.jl") end
module regularize_tests include("regularize.jl") end
module truncnorm_tests include("truncnorm.jl") end
module optim_tests include("optim.jl") end
module partition_tests include("partition.jl") end
module metropolis_tests include("metropolis.jl") end

@time @safetestset "zerosum" begin include("gauge/zerosum.jl") end
@time @safetestset "rescale_hidden" begin include("gauge/rescale_hidden.jl") end
@time @safetestset "pcd" begin include("pcd.jl") end
module zerosum_tests include("gauge/zerosum.jl") end
module rescale_hidden_tests include("gauge/rescale_hidden.jl") end
module pcd_tests include("pcd.jl") end

module shift_fields_tests include("shift_fields.jl") end

module aqua_tests include("aqua.jl") end
2 changes: 1 addition & 1 deletion test/util.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Statistics
import RestrictedBoltzmannMachines as RBMs
using Test: @test, @testset, @inferred
using Test: @test, @testset, @inferred, @test_throws
using Statistics: mean, var, cov
using LinearAlgebra: dot
using EllipsisNotation: (..)
Expand Down

0 comments on commit 3f84b62

Please sign in to comment.