Spaces:
Sleeping
Sleeping
deepsource-autofix[bot]
commited on
Commit
•
58cb6bc
1
Parent(s):
1413838
style: format code with Black
Browse filesThis commit fixes the style issues introduced in 1413838 according to the output
from Black.
Details: https://github.com/MilesCranmer/PySR/pull/564
- pysr/julia_extensions.py +1 -0
- pysr/sr.py +9 -6
pysr/julia_extensions.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
"""This file installs and loads extensions for SymbolicRegression."""
|
|
|
2 |
from .julia_import import jl
|
3 |
|
4 |
|
|
|
1 |
"""This file installs and loads extensions for SymbolicRegression."""
|
2 |
+
|
3 |
from .julia_import import jl
|
4 |
|
5 |
|
pysr/sr.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
"""Define the PySRRegressor scikit-learn interface."""
|
|
|
2 |
import copy
|
3 |
import os
|
4 |
import pickle as pkl
|
@@ -1659,9 +1660,9 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1659 |
fraction_replaced_hof=self.fraction_replaced_hof,
|
1660 |
should_simplify=self.should_simplify,
|
1661 |
should_optimize_constants=self.should_optimize_constants,
|
1662 |
-
warmup_maxsize_by=
|
1663 |
-
|
1664 |
-
|
1665 |
use_frequency=self.use_frequency,
|
1666 |
use_frequency_in_tournament=self.use_frequency_in_tournament,
|
1667 |
adaptive_parsimony_scaling=self.adaptive_parsimony_scaling,
|
@@ -1743,9 +1744,11 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
|
|
1743 |
),
|
1744 |
y_variable_names=jl_y_variable_names,
|
1745 |
X_units=jl_array(self.X_units_),
|
1746 |
-
y_units=
|
1747 |
-
|
1748 |
-
|
|
|
|
|
1749 |
options=options,
|
1750 |
numprocs=cprocs,
|
1751 |
parallelism=parallelism,
|
|
|
1 |
"""Define the PySRRegressor scikit-learn interface."""
|
2 |
+
|
3 |
import copy
|
4 |
import os
|
5 |
import pickle as pkl
|
|
|
1660 |
fraction_replaced_hof=self.fraction_replaced_hof,
|
1661 |
should_simplify=self.should_simplify,
|
1662 |
should_optimize_constants=self.should_optimize_constants,
|
1663 |
+
warmup_maxsize_by=(
|
1664 |
+
0.0 if self.warmup_maxsize_by is None else self.warmup_maxsize_by
|
1665 |
+
),
|
1666 |
use_frequency=self.use_frequency,
|
1667 |
use_frequency_in_tournament=self.use_frequency_in_tournament,
|
1668 |
adaptive_parsimony_scaling=self.adaptive_parsimony_scaling,
|
|
|
1744 |
),
|
1745 |
y_variable_names=jl_y_variable_names,
|
1746 |
X_units=jl_array(self.X_units_),
|
1747 |
+
y_units=(
|
1748 |
+
jl_array(self.y_units_)
|
1749 |
+
if isinstance(self.y_units_, list)
|
1750 |
+
else self.y_units_
|
1751 |
+
),
|
1752 |
options=options,
|
1753 |
numprocs=cprocs,
|
1754 |
parallelism=parallelism,
|