Skip to content

Commit 4f0b8c5

Browse files
authored
Merge pull request #258 from MilesCranmer/fix-worldage-issues
Fix worldage issues by avoiding `static_hasmethod` when not needed
2 parents 998aee5 + ce5e1e7 commit 4f0b8c5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SymbolicRegression"
22
uuid = "8254be44-1295-4e6a-a16d-46603ac705cb"
33
authors = ["MilesCranmer <[email protected]>"]
4-
version = "0.22.3"
4+
version = "0.22.4"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/LossFunctions.jl

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module LossFunctionsModule
22

33
import Random: MersenneTwister
44
using StatsBase: StatsBase
5-
import Tricks: static_hasmethod
65
import DynamicExpressions: Node
76
using LossFunctions: LossFunctions
87
import LossFunctions: SupervisedLoss
@@ -75,7 +74,7 @@ end
7574
function evaluator(
7675
f::F, tree::Node{T}, dataset::Dataset{T,L}, options::Options, idx
7776
)::L where {T<:DATA_TYPE,L<:LOSS_TYPE,F}
78-
if static_hasmethod(f, typeof((tree, dataset, options, idx)))
77+
if hasmethod(f, typeof((tree, dataset, options, idx)))
7978
# If user defines method that accepts batching indices:
8079
return f(tree, dataset, options, idx)
8180
elseif options.batching

0 commit comments

Comments
 (0)