Spaces:
Sleeping
Sleeping
Commit
·
456e76d
1
Parent(s):
d81b4be
Fix inline functions missing on worker process
Browse files- pysr/sr.py +3 -4
pysr/sr.py
CHANGED
|
@@ -334,8 +334,8 @@ def _create_julia_files(dataset_filename, def_datasets, hyperparam_filename, de
|
|
| 334 |
local_install = Path(local_install) / "src" / "SymbolicRegression.jl"
|
| 335 |
print(f'@everywhere include("{_escape_filename(local_install)}")', file=f)
|
| 336 |
print(f'@everywhere using .SymbolicRegression', file=f)
|
| 337 |
-
print(f'include("{_escape_filename(hyperparam_filename)}")', file=f)
|
| 338 |
-
print(f'include("{_escape_filename(dataset_filename)}")', file=f)
|
| 339 |
if len(variable_names) == 0:
|
| 340 |
varMap = "[" + ",".join([f'"x{i}"' for i in range(X.shape[1])]) + "]"
|
| 341 |
else:
|
|
@@ -371,8 +371,7 @@ def _make_hyperparams_julia_str(X, alpha, annealing, batchSize, batching, binary
|
|
| 371 |
ncyclesperiteration, fractionReplaced, topn, verbosity,
|
| 372 |
weightDeleteNode, weightDoNothing, weightInsertNode, weightMutateConstant,
|
| 373 |
weightMutateOperator, weightRandomize, weightSimplify, weights, **kwargs):
|
| 374 |
-
def_hyperparams += f"""
|
| 375 |
-
plus=SymbolicRegression.plus
|
| 376 |
sub=SymbolicRegression.sub
|
| 377 |
mult=SymbolicRegression.mult
|
| 378 |
square=SymbolicRegression.square
|
|
|
|
| 334 |
local_install = Path(local_install) / "src" / "SymbolicRegression.jl"
|
| 335 |
print(f'@everywhere include("{_escape_filename(local_install)}")', file=f)
|
| 336 |
print(f'@everywhere using .SymbolicRegression', file=f)
|
| 337 |
+
print(f'@everywhere include("{_escape_filename(hyperparam_filename)}")', file=f)
|
| 338 |
+
print(f'@everywhere include("{_escape_filename(dataset_filename)}")', file=f)
|
| 339 |
if len(variable_names) == 0:
|
| 340 |
varMap = "[" + ",".join([f'"x{i}"' for i in range(X.shape[1])]) + "]"
|
| 341 |
else:
|
|
|
|
| 371 |
ncyclesperiteration, fractionReplaced, topn, verbosity,
|
| 372 |
weightDeleteNode, weightDoNothing, weightInsertNode, weightMutateConstant,
|
| 373 |
weightMutateOperator, weightRandomize, weightSimplify, weights, **kwargs):
|
| 374 |
+
def_hyperparams += f"""plus=SymbolicRegression.plus
|
|
|
|
| 375 |
sub=SymbolicRegression.sub
|
| 376 |
mult=SymbolicRegression.mult
|
| 377 |
square=SymbolicRegression.square
|