Spaces:
Sleeping
Sleeping
Commit
·
e7ff6db
1
Parent(s):
255c89c
More helpful error message for custom operator
Browse files- pysr/sr.py +2 -2
pysr/sr.py
CHANGED
|
@@ -948,9 +948,9 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
| 948 |
# Add extra information to the error, to say that the user
|
| 949 |
# should try to adjust extra_sympy_params.
|
| 950 |
raise ValueError(
|
| 951 |
-
"Failed to evaluate the expression
|
| 952 |
"If you are using a custom operator, make sure to define it in extra_sympy_mappings, "
|
| 953 |
-
"e.g., `model.extra_sympy_mappings
|
| 954 |
) from error
|
| 955 |
|
| 956 |
|
|
|
|
| 948 |
# Add extra information to the error, to say that the user
|
| 949 |
# should try to adjust extra_sympy_params.
|
| 950 |
raise ValueError(
|
| 951 |
+
"Failed to evaluate the expression. "
|
| 952 |
"If you are using a custom operator, make sure to define it in extra_sympy_mappings, "
|
| 953 |
+
"e.g., `model.set_params(extra_sympy_mappings={'inv': lambda x: 1 / x})`."
|
| 954 |
) from error
|
| 955 |
|
| 956 |
|