Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
488c798
1
Parent(s):
0a9f0c4
Update backend with strings allowed for parallelism arg
Browse files- pysr/sr.py +2 -8
- pysr/version.py +1 -1
pysr/sr.py
CHANGED
@@ -1611,16 +1611,9 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1611 |
None if parallelism in ["serial", "multithreading"] else int(self.procs)
|
1612 |
)
|
1613 |
|
1614 |
-
# Can't pass symbol to PyJulia, so need to eval a function:
|
1615 |
-
Main.eval(
|
1616 |
-
"call_sr(@nospecialize args...; @nospecialize kws...)"
|
1617 |
-
" = SymbolicRegression.EquationSearch(args...;"
|
1618 |
-
f"parallelism=:{parallelism}, kws...)"
|
1619 |
-
)
|
1620 |
-
|
1621 |
# Call to Julia backend.
|
1622 |
# See https://github.com/MilesCranmer/SymbolicRegression.jl/blob/master/src/SymbolicRegression.jl
|
1623 |
-
self.raw_julia_state_ =
|
1624 |
Main.X,
|
1625 |
Main.y,
|
1626 |
weights=Main.weights,
|
@@ -1628,6 +1621,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1628 |
varMap=self.feature_names_in_.tolist(),
|
1629 |
options=options,
|
1630 |
numprocs=cprocs,
|
|
|
1631 |
saved_state=self.raw_julia_state_,
|
1632 |
addprocs_function=cluster_manager,
|
1633 |
)
|
|
|
1611 |
None if parallelism in ["serial", "multithreading"] else int(self.procs)
|
1612 |
)
|
1613 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1614 |
# Call to Julia backend.
|
1615 |
# See https://github.com/MilesCranmer/SymbolicRegression.jl/blob/master/src/SymbolicRegression.jl
|
1616 |
+
self.raw_julia_state_ = SymbolicRegression.EquationSearch(
|
1617 |
Main.X,
|
1618 |
Main.y,
|
1619 |
weights=Main.weights,
|
|
|
1621 |
varMap=self.feature_names_in_.tolist(),
|
1622 |
options=options,
|
1623 |
numprocs=cprocs,
|
1624 |
+
parallelism=parallelism,
|
1625 |
saved_state=self.raw_julia_state_,
|
1626 |
addprocs_function=cluster_manager,
|
1627 |
)
|
pysr/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
__version__ = "0.11.6"
|
2 |
-
__symbolic_regression_jl_version__ = "0.13.
|
|
|
1 |
__version__ = "0.11.6"
|
2 |
+
__symbolic_regression_jl_version__ = "0.13.2"
|