Skip to content

Commit

Permalink
fixed deprecation warning from improper Vararg use (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
ExpandingMan authored Feb 28, 2023
1 parent 95f8177 commit 8e5bfe8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FluxTraining"
uuid = "7bf95e4d-ca32-48da-9824-f0dc5310474f"
authors = ["lorenzoh <[email protected]>"]
version = "0.3.6"
version = "0.3.7"

[deps]
BSON = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0"
Expand Down
3 changes: 2 additions & 1 deletion src/learner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ function Learner(model, lossfn; callbacks = [], data = (), optimizer = ADAM(), k
end


# note that Vararg is covariant, using Vararg{<:Callback} produces warning
"""
Learner(model, data, optimizer, lossfn, [callbacks...; kwargs...])
"""
function Learner(
model, data, optimizer, lossfn, callbacks::Vararg{<:Callback};
model, data, optimizer, lossfn, callbacks::Vararg{Callback};
usedefaultcallbacks=true, cbrunner=LinearRunner()
)
callbacks = collect(Callback, callbacks)
Expand Down

2 comments on commit 8e5bfe8

@lorenzoh
Copy link
Member

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/78707

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.3.7 -m "<description of version>" 8e5bfe8f714549baf003cb5892392263c2a42237
git push origin v0.3.7

Please sign in to comment.