Skip to content

Commit

Permalink
Merge pull request #8 from LuxDL/ap/simplify_ext
Browse files Browse the repository at this point in the history
Use PackageExtensionCompat
  • Loading branch information
avik-pal authored Jun 26, 2023
2 parents f01995c + 529be03 commit 2415f3b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 23 deletions.
5 changes: 0 additions & 5 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ steps:
setup:
julia:
- "1"
- "1.6"
- "1.9-nightly"
- "nightly"
adjustments:
- with:
julia: "1.6" # GPU compilation for some of the gigantic models break
soft_fail: true
- with:
julia: "nightly"
soft_fail: true
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
version:
- "1"
- "1.6"
- "~1.9.0-0"
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
Expand All @@ -44,4 +43,3 @@ jobs:
- uses: codecov/codecov-action@v3
with:
files: lcov.info
flags: ${{ matrix.group }}
8 changes: 4 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Boltz"
uuid = "4544d5e4-abc5-4dea-817f-29e4c205d9c8"
authors = ["Avik Pal <avikpal@mit.edu> and contributors"]
version = "0.2.0"
version = "0.2.1"

[deps]
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -11,8 +11,8 @@ JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[weakdeps]
Expand All @@ -27,8 +27,8 @@ ChainRulesCore = "1.15"
JLD2 = "0.4"
Lux = "0.4.26"
Metalhead = "0.7"
NNlib = "0.8"
Requires = "1"
NNlib = "0.8, 0.9"
PackageExtensionCompat = "1"
julia = "1.6"

[extras]
Expand Down
3 changes: 1 addition & 2 deletions ext/BoltzFluxMetalheadExt.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module BoltzFluxMetalheadExt

isdefined(Base, :get_extension) ? (using Metalhead) : (using ..Metalhead)
using Boltz, Lux
using Boltz, Lux, Metalhead
import Boltz: alexnet, convmixer, densenet, googlenet, mobilenet, resnet, resnext
using Boltz: _initialize_model, assert_name_present_in

Expand Down
12 changes: 2 additions & 10 deletions src/Boltz.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@ using Artifacts, JLD2, LazyArtifacts
import ChainRulesCore as CRC

# Extensions
if !isdefined(Base, :get_extension)
using Requires
end

using PackageExtensionCompat
function __init__()
@static if !isdefined(Base, :get_extension)
# Import Flux Models
@require Metalhead="dbeba491-748d-5e0e-a39e-b530a07fa0cc" begin
include("../ext/BoltzFluxMetalheadExt.jl")
end
end
@require_extensions
end

# Define functions. Methods defined in files or in extensions later
Expand Down

2 comments on commit 2415f3b

@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/86299

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.2.1 -m "<description of version>" 2415f3b6c9473c3f4a38a3a0ab5260a824be698a
git push origin v0.2.1

Please sign in to comment.