Conversation
- Add scalar-distance callable `(rbf::T)(r2)` to Gaussian, IMQ, PHS1/3/5/7;
delegate point-pair callables to it so the formula lives in one place
- Add `src/lux.jl` with `RBFLayer` (Lux.jl-compatible RBF network layer):
learnable centers, per-center shape parameters via softplus, all six
RBF types supported; uses the new scalar callables to avoid duplication
- Use `basis_type::Type{B}` struct field instead of `basis::Symbol`,
enforced by the type system; `_rbf_activate` and `_has_shape_parameter`
dispatch on types rather than `Val{:symbol}`
- Add docs guide `docs/src/guides/lux.md` covering theory, training example,
and comparison with MLP; wire into docs nav
- Add `test/lux.jl` with 122 tests covering construction, initialization,
forward pass, activation math, and pretty printing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The validation used `all(ε .< 0)` which only rejected negative values, allowing ε=0 through. Changed to `ε <= 0` to correctly reject zero.
Move Lux integration from a hard dependency to a package extension that loads only when LuxCore is available. Adds RBFLayer struct in main package with LuxCore trait implementations in the extension.
The v0.4.0 compat entry caused Downgrade CI to fail with KeyError since the version isn't in the General registry yet. The docs project uses the local dev version via path, so this bound is unnecessary.
The docs project has heavy deps (CairoMakie, Lux, Enzyme, etc.) whose minimum compat versions conflict when downgraded together. Docs builds documentation, not package tests, so downgrade testing is irrelevant.
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
- Add [compat] section to test/Project.toml to prevent resolver from picking ancient broken versions of test dependencies - Switch downgrade mode from alldeps to deps to focus on direct dep bounds - Expand skip list to include test-only and extension deps - Replace julia-runtest with manual test runner (Pkg.develop + include) to avoid "can not merge projects" error on Julia < 1.12 - Update benchmark julia compat from 1.9 to 1.10
The downgrade-compat action was crashing with KeyError on the RadialBasisFunctions UUID because it tried to resolve the dev'd package from the registry. Remove it from test/Project.toml [compat] and add it to the workflow skip list.
Contributor
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Mooncake 0.4.x uses Core.Intrinsics.arraylen which was removed in modern Julia, causing precompilation failures during downgrade resolution.
Remove test/ from downgrade CI projects and trim skip list to only stdlibs and weakdeps. Test-only deps (DifferentiationInterface, ForwardDiff, etc.) aren't part of the public API contract and were causing repeated CI failures on Julia 1.10 minimum-version resolution.
Lux now requires all layers in Chain to be <: AbstractLuxLayer. Move LuxCore from weakdep to direct dep (lightweight, just abstract types) so RBFLayer can inherit from AbstractLuxLayer at definition. Inline the former extension code into src/lux.jl since the extension trigger is no longer valid with LuxCore as a direct dep.
…ux example Zygote can't differentiate through in-place mutations in _pairwise_sq_euclidean, breaking the docs build. Switch to DifferentiationInterface with Mooncake backend which handles mutations correctly.
Mooncake.Tangent doesn't implement `length`, which Optimisers.update needs, breaking the @example blocks in docs CI. Enzyme works on 1.12 and handles this correctly with Const function annotation.
Widen threshold from 1e-10 to 1e-9 to match the max_error bound. Actual value on 1.11 is 1.027e-10, just barely over the old limit.
LuxCore was a direct dependency used solely for AbstractLuxLayer. Moving the Lux code to a package extension avoids loading LuxCore for users who don't need it, following the existing pattern (Enzyme, Mooncake).
Add Lux integration to README feature list and docs links. Update CLAUDE.md architecture section to list LuxCoreExt. Fix docs build by adding LuxCore to docs/Project.toml and using const assignment for RBFLayer in @example blocks. Relax docs compat bounds.
Member
Author
|
closes #45 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RBFLayer— a Lux.jl-compatible RBF network layer viaLuxCorepackage extensionε=0(wasall(ε .< 0), nowε <= 0)rbf(r²)andrbf(x, xᵢ)overloads to eliminate redundant distance computation0.3.0→0.4.0