-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecation warning on keywords mem of LBFGS operators
- Loading branch information
1 parent
174c648
commit 9f26ca1
Showing
5 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,6 @@ include("TimedOperators.jl") | |
# Utilities | ||
include("utilities.jl") | ||
|
||
include("deprecated.jl") | ||
|
||
end # module |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Deprecated use of positional argument mem | ||
@deprecate LBFGSOperator(T :: DataType, n :: Int, mem :: Int; kwargs...) LBFGSOperator(T, n; mem=mem, kwargs...) false | ||
@deprecate LBFGSOperator(n :: Int, mem :: Int; kwargs...) LBFGSOperator(n; mem=mem, kwargs...) false | ||
@deprecate InverseLBFGSOperator(T :: DataType, n :: Int, mem :: Int; kwargs...) InverseLBFGSOperator(T, n; mem=mem, kwargs...) false | ||
@deprecate InverseLBFGSOperator(n :: Int, mem :: Int; kwargs...) InverseLBFGSOperator(n; mem=mem, kwargs...) false | ||
@deprecate LSR1Operator(T :: DataType, n :: Int, mem :: Int; kwargs...) LSR1Operator(T, n; mem=mem, kwargs...) false | ||
@deprecate LSR1Operator(n :: Int, mem :: Int; kwargs...) LSR1Operator(n; mem=mem, kwargs...) false | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function test_deprecated() | ||
@testset ExtendedTestSet "Deprecated methods" begin | ||
n = 10 | ||
mem = 3 | ||
T = Float16 | ||
@test_deprecated LBFGSOperator(n, mem, scaling=false) | ||
@test_deprecated InverseLBFGSOperator(n, mem, scaling=false) | ||
@test_deprecated LBFGSOperator(T, n, mem, scaling=false) | ||
@test_deprecated InverseLBFGSOperator(T, n, mem, scaling=false) | ||
@test_deprecated LSR1Operator(n, mem, scaling=false) | ||
@test_deprecated LSR1Operator(T, n, mem, scaling=false) | ||
end | ||
end | ||
|
||
test_deprecated() |