Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge pull request #18 from LuxDL/ap/downgrade
Browse files Browse the repository at this point in the history
Add downgrade CI
  • Loading branch information
avik-pal authored Feb 12, 2024
2 parents 723d7a4 + 37c48d2 commit bde282c
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 46 deletions.
12 changes: 2 additions & 10 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ steps:
setup:
julia:
- "1"
- "1.6"
adjustments:
- with:
julia: "1.6"
soft_fail: true

# Downstream CUDA Tests
- group: ":telescope: Downstream CUDA"
Expand Down Expand Up @@ -73,15 +68,10 @@ steps:
matrix:
setup:
julia:
- "1.6"
- "1"
repo:
- "Lux"
- "Boltz"
adjustments:
- with:
julia: "1.6"
soft_fail: true

# Downstream AMDGPU Tests
- group: ":telescope: Downstream AMD GPU"
Expand Down Expand Up @@ -137,6 +127,8 @@ steps:
- "Boltz"

env:
RETESTITEMS_NWORKERS: 4
RETESTITEMS_NWORKER_THREADS: 2
SECRET_CODECOV_TOKEN: "DpNKbuKYRX40vpyJCfTvQmxwls1hlCUWiZX4pnsukt9E8u4pf0WUcIroRv2UDDbGYjuk5izmZ9yAhZZhiGMhjFF/TIji3JiYe1sXWdfSrNk0N2+CNoXo+CIi3JvS7mB+YAIUTEi2Xph+L7R0d+It079PEispqVv4bdRuqgSbY7Rn3NSsoV1cB8uUaVFBJH4EewC6Hceg80QW7q+CBru+QECudKbAWnRVLoizRsgzIld+gTUqsI1PhR+vSpD+AfZzhVxmff55ttVcMUFGnL3w4L74qoLVPET52/GPLCOi3RLGSzBJjebSBqqKOwesT9xJ4yaZ21AEzyeOm86YRc2WYg==;U2FsdGVkX1/eBwyJ7Of++vKyAWDSBvSdJeiKmVmlaVKFU5CHejM+sDlSZWH/WmoBatLcqH+eUVEGXC+oWl5riw=="


8 changes: 5 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ jobs:
matrix:
version:
- "1"
- "1.6"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: actions/cache@v3
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
Expand All @@ -42,6 +41,9 @@ jobs:
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
41 changes: 41 additions & 0 deletions .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Downgrade
on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
push:
branches:
- master
paths-ignore:
- 'docs/**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version: ['1.9']
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
- uses: cjdoris/julia-downgrade-compat-action@v1
with:
skip: Pkg,TOML
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
GROUP: "CPU"
RETESTITEMS_NWORKERS: 4
RETESTITEMS_NWORKER_THREADS: 2
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
10 changes: 8 additions & 2 deletions .github/workflows/Downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ jobs:
@info "Not compatible with this release. No problem." exception=err
exit(0) # Exit immediately, as a success
end
env:
RETESTITEMS_NWORKERS: 4
RETESTITEMS_NWORKER_THREADS: 2
- uses: julia-actions/julia-processcoverage@v1
with:
directories: src,ext
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
files: lcov.info
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/FormatPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
Expand Down
27 changes: 19 additions & 8 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name = "WeightInitializers"
uuid = "d49dbf32-c5c2-4618-8acc-27bb2598ef2d"
authors = ["Avik Pal <[email protected]> and contributors"]
version = "0.1.3"
version = "0.1.4"

[deps]
PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"
PartialFunctions = "570af359-4316-4cb7-8c74-252c00c2016b"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -17,13 +17,24 @@ CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
WeightInitializersCUDAExt = "CUDA"

[compat]
CUDA = "4, 5"
PackageExtensionCompat = "1"
PartialFunctions = "1"
Random = "<0.0.1, 1"
Aqua = "0.8"
CUDA = "5"
PartialFunctions = "1.2"
PrecompileTools = "1.2"
Random = "1.9"
SpecialFunctions = "2"
Statistics = "<0.01, 1"
julia = "1.6"
StableRNGs = "1"
Statistics = "1.9"
Test = "1.9"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Test", "StableRNGs", "Random", "Statistics", "CUDA"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Join the chat at https://julialang.zulipchat.com #machine-learning](https://img.shields.io/static/v1?label=Zulip&message=chat&color=9558b2&labelColor=389826)](https://julialang.zulipchat.com/#narrow/stream/machine-learning)
[![Latest Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://lux.csail.mit.edu/dev/api/)
[![Stable Docs](https://img.shields.io/badge/docs-stable-blue.svg)](https://lux.csail.mit.edu/stable/api/)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

[![Build status](https://badge.buildkite.com/ffa2c8c3629cd58322446cddd3e8dcc4f121c28a574ee3e626.svg?branch=main)](https://buildkite.com/julialang/weightinitializers-dot-jl)
[![CI](https://github.com/LuxDL/WeightInitializers.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/LuxDL/WeightInitializers.jl/actions/workflows/CI.yml)
Expand Down
7 changes: 3 additions & 4 deletions src/WeightInitializers.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
module WeightInitializers

using PartialFunctions, Random, SpecialFunctions, Statistics
import PrecompileTools: @recompile_invalidations

import PackageExtensionCompat: @require_extensions
function __init__()
@require_extensions
@recompile_invalidations begin
using PartialFunctions, Random, SpecialFunctions, Statistics
end

include("utils.jl")
Expand Down
3 changes: 2 additions & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ end
name = NAME_TO_DIST[Symbol(funcname)]
dist_type = NUM_TO_FPOINT[Symbol(fp)]
return """
$fname([::AbstractRNG=_default_rng()], size...; kwargs...) -> AbstractArray{$(dist_type), length(size)}
$fname([::AbstractRNG=_default_rng()], size...;
kwargs...) -> AbstractArray{$(dist_type), length(size)}
Return an `AbstractArray{$(dist_type)}` of the given `size` containing $(name).
"""
Expand Down
10 changes: 0 additions & 10 deletions test/Project.toml

This file was deleted.

16 changes: 9 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using WeightInitializers, Test, SafeTestsets, Statistics
using Aqua, WeightInitializers, Test, Statistics
using StableRNGs, Random, CUDA

CUDA.allowscalar(false)
Expand Down Expand Up @@ -143,11 +143,13 @@ const GROUP = get(ENV, "GROUP", "All")
end
end

@static if VERSION v"1.9"
@testset "Warning: truncated_normal" begin
@test_warn "Mean is more than 2 std outside the limits in truncated_normal, so the distribution of values may be inaccurate." truncated_normal(
2;
mean=-5.0f0)
end
@testset "Warning: truncated_normal" begin
@test_warn "Mean is more than 2 std outside the limits in truncated_normal, so \
the distribution of values may be inaccurate." truncated_normal(2; mean=-5.0f0)
end

@testset "Aqua: Quality Assurance" begin
Aqua.test_all(WeightInitializers; ambiguities=false)
Aqua.test_ambiguities(WeightInitializers; recursive=false)
end
end

2 comments on commit bde282c

@avik-pal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/100671

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.4 -m "<description of version>" bde282ca4ea10c9e16b98432ee41a947cb7ebfe5
git push origin v0.1.4

Please sign in to comment.