Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
4c048fc
1
Parent(s):
d8f5888
Allow threads>cores
Browse files
eureqa.jl
CHANGED
@@ -10,7 +10,6 @@ const nuna = size(unaops)[1]
|
|
10 |
const nbin = size(binops)[1]
|
11 |
const nops = nuna + nbin
|
12 |
const nvar = size(X)[2];
|
13 |
-
const nthreads = Threads.nthreads()
|
14 |
|
15 |
function debug(verbosity, string...)
|
16 |
verbosity > 0 ? println(string...) : nothing
|
|
|
10 |
const nbin = size(binops)[1]
|
11 |
const nops = nuna + nbin
|
12 |
const nvar = size(X)[2];
|
|
|
13 |
|
14 |
function debug(verbosity, string...)
|
15 |
verbosity > 0 ? println(string...) : nothing
|
eureqa.py
CHANGED
@@ -86,6 +86,7 @@ def eureqa(X=None, y=None, threads=4, parsimony=1e-3, alpha=10,
|
|
86 |
const fractionReplacedHof = {fractionReplacedHof}f0
|
87 |
const shouldOptimizeConstants = {'true' if shouldOptimizeConstants else 'false'}
|
88 |
const hofFile = "{equation_file}"
|
|
|
89 |
"""
|
90 |
|
91 |
assert len(X.shape) == 2
|
|
|
86 |
const fractionReplacedHof = {fractionReplacedHof}f0
|
87 |
const shouldOptimizeConstants = {'true' if shouldOptimizeConstants else 'false'}
|
88 |
const hofFile = "{equation_file}"
|
89 |
+
const nthreads = {threads:d}
|
90 |
"""
|
91 |
|
92 |
assert len(X.shape) == 2
|