Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
859581c
1
Parent(s):
8550d13
Enable timeout argument
Browse files- pysr/sr.py +5 -0
- pysr/version.py +2 -2
pysr/sr.py
CHANGED
@@ -355,6 +355,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
355 |
populations=100,
|
356 |
niterations=4,
|
357 |
ncyclesperiteration=100,
|
|
|
358 |
alpha=0.1,
|
359 |
annealing=False,
|
360 |
fractionReplaced=0.01,
|
@@ -447,6 +448,8 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
447 |
:type maxsize: int
|
448 |
:param ncyclesperiteration: Number of total mutations to run, per 10 samples of the population, per iteration.
|
449 |
:type ncyclesperiteration: int
|
|
|
|
|
450 |
:param alpha: Initial temperature.
|
451 |
:type alpha: float
|
452 |
:param annealing: Whether to use annealing. You should (and it is default).
|
@@ -610,6 +613,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
610 |
populations=populations,
|
611 |
niterations=niterations,
|
612 |
ncyclesperiteration=ncyclesperiteration,
|
|
|
613 |
alpha=alpha,
|
614 |
annealing=annealing,
|
615 |
fractionReplaced=fractionReplaced,
|
@@ -1155,6 +1159,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
1155 |
stateReturn=True, # Required for state saving.
|
1156 |
use_symbolic_utils=self.params["use_symbolic_utils"],
|
1157 |
progress=self.params["progress"],
|
|
|
1158 |
)
|
1159 |
|
1160 |
np_dtype = {16: np.float16, 32: np.float32, 64: np.float64}[
|
|
|
355 |
populations=100,
|
356 |
niterations=4,
|
357 |
ncyclesperiteration=100,
|
358 |
+
timeout_in_seconds=None,
|
359 |
alpha=0.1,
|
360 |
annealing=False,
|
361 |
fractionReplaced=0.01,
|
|
|
448 |
:type maxsize: int
|
449 |
:param ncyclesperiteration: Number of total mutations to run, per 10 samples of the population, per iteration.
|
450 |
:type ncyclesperiteration: int
|
451 |
+
:param timeout_in_seconds: Make the search return early once this many seconds have passed.
|
452 |
+
:type timeout_in_seconds: float/int
|
453 |
:param alpha: Initial temperature.
|
454 |
:type alpha: float
|
455 |
:param annealing: Whether to use annealing. You should (and it is default).
|
|
|
613 |
populations=populations,
|
614 |
niterations=niterations,
|
615 |
ncyclesperiteration=ncyclesperiteration,
|
616 |
+
timeout_in_seconds=timeout_in_seconds,
|
617 |
alpha=alpha,
|
618 |
annealing=annealing,
|
619 |
fractionReplaced=fractionReplaced,
|
|
|
1159 |
stateReturn=True, # Required for state saving.
|
1160 |
use_symbolic_utils=self.params["use_symbolic_utils"],
|
1161 |
progress=self.params["progress"],
|
1162 |
+
timeout_in_seconds=self.params["timeout_in_seconds"],
|
1163 |
)
|
1164 |
|
1165 |
np_dtype = {16: np.float16, 32: np.float32, 64: np.float64}[
|
pysr/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
__version__ = "0.7.
|
2 |
-
__symbolic_regression_jl_version__ = "0.7.
|
|
|
1 |
+
__version__ = "0.7.6"
|
2 |
+
__symbolic_regression_jl_version__ = "0.7.9"
|