Skip to content

Commit 7a1db20

Browse files
committed
refactor: better parameter ordering
1 parent 5b4a712 commit 7a1db20

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/MLJInterface.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ function modelexpr(
7777
numprocs::Union{Int,Nothing} = nothing
7878
procs::Union{Vector{Int},Nothing} = nothing
7979
addprocs_function::Union{Function,Nothing} = nothing
80-
worker_timeout::Union{Real,Nothing} = nothing
8180
heap_size_hint_in_bytes::Union{Integer,Nothing} = nothing
81+
worker_timeout::Union{Real,Nothing} = nothing
8282
worker_imports::Union{Vector{Symbol},Nothing} = nothing
8383
logger::Union{AbstractSRLogger,Nothing} = nothing
8484
runtests::Bool = true
@@ -300,8 +300,8 @@ function _update(
300300
numprocs=m.numprocs,
301301
procs=m.procs,
302302
addprocs_function=m.addprocs_function,
303-
worker_timeout=m.worker_timeout,
304303
heap_size_hint_in_bytes=m.heap_size_hint_in_bytes,
304+
worker_timeout=m.worker_timeout,
305305
worker_imports=m.worker_imports,
306306
runtests=m.runtests,
307307
saved_state=(old_fitresult === nothing ? nothing : old_fitresult.state),

src/SearchUtils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ end
118118
numprocs::Union{Int,Nothing}=nothing,
119119
procs::Union{Vector{Int},Nothing}=nothing,
120120
addprocs_function::Union{Function,Nothing}=nothing,
121-
worker_timeout::Union{Real,Nothing}=nothing,
122121
heap_size_hint_in_bytes::Union{Integer,Nothing}=nothing,
122+
worker_timeout::Union{Real,Nothing}=nothing,
123123
worker_imports::Union{Vector{Symbol},Nothing}=nothing,
124124
runtests::Bool=true,
125125
return_state::VRS=nothing,

src/SymbolicRegression.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,15 +406,15 @@ which is useful for debugging and profiling.
406406
which is the number of processes to use, as well as the `lazy` keyword argument.
407407
For example, if set up on a slurm cluster, you could pass
408408
`addprocs_function = addprocs_slurm`, which will set up slurm processes.
409-
- `worker_timeout::Union{Real,Nothing}=nothing`: Timeout in seconds for worker processes
410-
to establish connection with the master process. If `JULIA_WORKER_TIMEOUT` is already set,
411-
that value is used. Otherwise defaults to `min(60, numprocs^2)`. When explicitly provided,
412-
this temporarily overrides `JULIA_WORKER_TIMEOUT` only during worker creation.
413409
- `heap_size_hint_in_bytes::Union{Int,Nothing}=nothing`: On Julia 1.9+, you may set the `--heap-size-hint`
414410
flag on Julia processes, recommending garbage collection once a process
415411
is close to the recommended size. This is important for long-running distributed
416412
jobs where each process has an independent memory, and can help avoid
417413
out-of-memory errors. By default, this is set to `Sys.free_memory() / numprocs`.
414+
- `worker_timeout::Union{Real,Nothing}=nothing`: Timeout in seconds for worker processes
415+
to establish connection with the master process. If `JULIA_WORKER_TIMEOUT` is already set,
416+
that value is used. Otherwise defaults to `min(60, numprocs^2)`. When explicitly provided,
417+
this temporarily overrides `JULIA_WORKER_TIMEOUT` only during worker creation.
418418
- `worker_imports::Union{Vector{Symbol},Nothing}=nothing`: If you want to import
419419
additional modules on each worker, pass them here as a vector of symbols.
420420
By default some of the extensions will automatically be loaded when needed.
@@ -473,8 +473,8 @@ function equation_search(
473473
numprocs::Union{Int,Nothing}=nothing,
474474
procs::Union{Vector{Int},Nothing}=nothing,
475475
addprocs_function::Union{Function,Nothing}=nothing,
476-
worker_timeout::Union{Real,Nothing}=nothing,
477476
heap_size_hint_in_bytes::Union{Integer,Nothing}=nothing,
477+
worker_timeout::Union{Real,Nothing}=nothing,
478478
worker_imports::Union{Vector{Symbol},Nothing}=nothing,
479479
runtests::Bool=true,
480480
saved_state=nothing,
@@ -525,8 +525,8 @@ function equation_search(
525525
numprocs=numprocs,
526526
procs=procs,
527527
addprocs_function=addprocs_function,
528-
worker_timeout=worker_timeout,
529528
heap_size_hint_in_bytes=heap_size_hint_in_bytes,
529+
worker_timeout=worker_timeout,
530530
worker_imports=worker_imports,
531531
runtests=runtests,
532532
saved_state=saved_state,

0 commit comments

Comments
 (0)