Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
8cf4bf3
1
Parent(s):
caf58a4
Add install function back with deprecation warning
Browse files- pysr/__init__.py +2 -0
- pysr/julia_helpers.py +10 -0
pysr/__init__.py
CHANGED
@@ -7,6 +7,7 @@ from . import sklearn_monkeypatch
|
|
7 |
from .deprecated import best, best_callable, best_row, best_tex, pysr
|
8 |
from .export_jax import sympy2jax
|
9 |
from .export_torch import sympy2torch
|
|
|
10 |
from .sr import PySRRegressor
|
11 |
|
12 |
# This file is created by setuptools_scm during the build process:
|
@@ -26,4 +27,5 @@ __all__ = [
|
|
26 |
"pysr",
|
27 |
"__version__",
|
28 |
"jl",
|
|
|
29 |
]
|
|
|
7 |
from .deprecated import best, best_callable, best_row, best_tex, pysr
|
8 |
from .export_jax import sympy2jax
|
9 |
from .export_torch import sympy2torch
|
10 |
+
from .julia_helpers import install
|
11 |
from .sr import PySRRegressor
|
12 |
|
13 |
# This file is created by setuptools_scm during the build process:
|
|
|
27 |
"pysr",
|
28 |
"__version__",
|
29 |
"jl",
|
30 |
+
"install",
|
31 |
]
|
pysr/julia_helpers.py
CHANGED
@@ -1,4 +1,6 @@
|
|
1 |
"""Functions for initializing the Julia environment and installing deps."""
|
|
|
|
|
2 |
from juliacall import convert as jl_convert # type: ignore
|
3 |
|
4 |
from .julia_import import jl
|
@@ -7,6 +9,14 @@ jl.seval("using Serialization: Serialization")
|
|
7 |
jl.seval("using PythonCall: PythonCall")
|
8 |
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
def _escape_filename(filename):
|
11 |
"""Turn a path into a string with correctly escaped backslashes."""
|
12 |
str_repr = str(filename)
|
|
|
1 |
"""Functions for initializing the Julia environment and installing deps."""
|
2 |
+
import warnings
|
3 |
+
|
4 |
from juliacall import convert as jl_convert # type: ignore
|
5 |
|
6 |
from .julia_import import jl
|
|
|
9 |
jl.seval("using PythonCall: PythonCall")
|
10 |
|
11 |
|
12 |
+
def install(*args, **kwargs):
|
13 |
+
del args, kwargs
|
14 |
+
warnings.warn(
|
15 |
+
"The `install` function has been removed. "
|
16 |
+
"PySR now uses the `juliacall` package to install its dependencies automatically at import time. "
|
17 |
+
)
|
18 |
+
|
19 |
+
|
20 |
def _escape_filename(filename):
|
21 |
"""Turn a path into a string with correctly escaped backslashes."""
|
22 |
str_repr = str(filename)
|