Skip to content

Commit

Permalink
Specialize on options again
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Dec 22, 2023
1 parent 1b0934d commit 70b2975
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/MLJInterface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function modelexpr(model_name::Symbol)
numprocs::Union{Int,Nothing} = nothing
procs::Union{Vector{Int},Nothing} = nothing
addprocs_function::Union{Function,Nothing} = nothing
heap_size_hint_in_bytes::Union{Integer,Nothing} = nothing
runtests::Bool = true
loss_type::L = Nothing
selection_method::Function = choose_best
Expand Down Expand Up @@ -166,6 +167,7 @@ function _update(m, verbosity, old_fitresult, old_cache, X, y, w, options)
numprocs=m.numprocs,
procs=m.procs,
addprocs_function=m.addprocs_function,
heap_size_hint_in_bytes=m.heap_size_hint_in_bytes,
runtests=m.runtests,
saved_state=(old_fitresult === nothing ? nothing : old_fitresult.state),
return_state=true,
Expand Down
5 changes: 3 additions & 2 deletions src/SymbolicRegression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ end
function equation_search(
datasets::Vector{D};
niterations::Int=10,
@nospecialize(options::Options = Options()),
options::Options = Options(),
parallelism=:multithreading,
numprocs::Union{Int,Nothing}=nothing,
procs::Union{Vector{Int},Nothing}=nothing,
Expand Down Expand Up @@ -529,6 +529,7 @@ function equation_search(
)
heap_size_hint_in_bytes === nothing &&
@info "Automatically setting --heap-size-hint=$(heap_size_hint_in_megabytes)M on each Julia process. You can set this manually with `heap_size_hint_in_bytes`."

`--heap-size=$(heap_size_hint_in_megabytes)M`
else
``
Expand Down Expand Up @@ -558,7 +559,7 @@ function _equation_search(
::Val{dim_out},
datasets::Vector{D},
niterations::Int,
@nospecialize(options::Options),
options::Options,
numprocs::Integer,
procs::Union{Vector{Int},Nothing},
addprocs_function::F,
Expand Down

0 comments on commit 70b2975

Please sign in to comment.