Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Dec 25, 2023
1 parent 79c61e4 commit 573126d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/CheckConstraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function count_max_nestedness(tree, degree, op)
t -> 0, # Leafs
t -> (t.degree == degree && t.op == op) ? 1 : 0, # Branches
(p, c...) -> p + max(c...), # Reduce
tree,
tree;
break_sharing=Val(true),
)
# Remove count of self:
Expand Down
4 changes: 3 additions & 1 deletion src/Configure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,9 @@ function import_module_on_workers(procs, filename::String, options::Options, ver
end
end

function test_module_on_workers(procs, options::Options, verbosity, ::Type{N}) where {N<:AbstractExpressionNode}
function test_module_on_workers(
procs, options::Options, verbosity, ::Type{N}
) where {N<:AbstractExpressionNode}
verbosity > 0 && @info "Testing module on workers..."
futures = []
for proc in procs
Expand Down
3 changes: 1 addition & 2 deletions src/HallOfFame.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module HallOfFameModule

import DynamicExpressions:
AbstractExpressionNode, Node, constructorof, string_tree
import DynamicExpressions: AbstractExpressionNode, Node, constructorof, string_tree
import DynamicExpressions.EquationModule: with_type_parameters
import ..UtilsModule: split_string
import ..CoreModule: MAX_DEGREE, Options, Dataset, DATA_TYPE, LOSS_TYPE, relu
Expand Down
12 changes: 9 additions & 3 deletions src/SymbolicRegression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,15 @@ function _equation_search(
verbosity,
progress,
::Val{RETURN_STATE},
) where {T<:DATA_TYPE,L<:LOSS_TYPE,D<:Dataset{T,L},N<:AbstractExpressionNode{T},PARALLELISM,RETURN_STATE,DIM_OUT}

) where {
T<:DATA_TYPE,
L<:LOSS_TYPE,
D<:Dataset{T,L},
N<:AbstractExpressionNode{T},
PARALLELISM,
RETURN_STATE,
DIM_OUT,
}
stdin_reader = watch_stream(stdin)

if options.define_helper_functions
Expand Down Expand Up @@ -631,7 +638,6 @@ function _equation_search(
# Best 10 members from each population for migration:
bestSubPops = init_dummy_pops(options.populations, datasets, options, N)


# Pointers to populations on each worker:
worker_output = [WorkerOutputType[] for j in 1:nout]
# Initialize storage for workers
Expand Down

0 comments on commit 573126d

Please sign in to comment.