Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
d8ae9fc
1
Parent(s):
c4c0a9e
Add update_verbosity arg for just quieting package info
Browse files- pysr/sr.py +7 -1
- setup.py +1 -1
pysr/sr.py
CHANGED
@@ -394,6 +394,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
394 |
extra_jax_mappings=None,
|
395 |
equation_file=None,
|
396 |
verbosity=1e9,
|
|
|
397 |
progress=None,
|
398 |
maxsize=20,
|
399 |
fast_cycle=False,
|
@@ -503,6 +504,8 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
503 |
:type equation_file: str
|
504 |
:param verbosity: What verbosity level to use. 0 means minimal print statements.
|
505 |
:type verbosity: int
|
|
|
|
|
506 |
:param progress: Whether to use a progress bar instead of printing to stdout.
|
507 |
:type progress: bool
|
508 |
:param maxdepth: Max depth of an equation. You can use both maxsize and maxdepth. maxdepth is by default set to = maxsize, which means that it is redundant.
|
@@ -562,6 +565,8 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
562 |
# Default is multithreading=True, unless explicitly set,
|
563 |
# or procs is set to 0 (serial mode).
|
564 |
multithreading = procs != 0
|
|
|
|
|
565 |
|
566 |
buffer_available = "buffer" in sys.stdout.__dir__()
|
567 |
|
@@ -640,6 +645,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
640 |
weightSimplify=weightSimplify,
|
641 |
perturbationFactor=perturbationFactor,
|
642 |
verbosity=verbosity,
|
|
|
643 |
progress=progress,
|
644 |
maxsize=maxsize,
|
645 |
fast_cycle=fast_cycle,
|
@@ -1047,7 +1053,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
|
|
1047 |
|
1048 |
if not already_ran:
|
1049 |
Main.eval("using Pkg")
|
1050 |
-
io = "devnull" if self.params["
|
1051 |
io_arg = f"io={io}" if is_julia_version_greater_eq(Main, "1.6") else ""
|
1052 |
|
1053 |
Main.eval(
|
|
|
394 |
extra_jax_mappings=None,
|
395 |
equation_file=None,
|
396 |
verbosity=1e9,
|
397 |
+
update_verbosity=None,
|
398 |
progress=None,
|
399 |
maxsize=20,
|
400 |
fast_cycle=False,
|
|
|
504 |
:type equation_file: str
|
505 |
:param verbosity: What verbosity level to use. 0 means minimal print statements.
|
506 |
:type verbosity: int
|
507 |
+
:param update_verbosity: What verbosity level to use for package updates. Will take value of `verbosity` if not given.
|
508 |
+
:type update_verbosity: int
|
509 |
:param progress: Whether to use a progress bar instead of printing to stdout.
|
510 |
:type progress: bool
|
511 |
:param maxdepth: Max depth of an equation. You can use both maxsize and maxdepth. maxdepth is by default set to = maxsize, which means that it is redundant.
|
|
|
565 |
# Default is multithreading=True, unless explicitly set,
|
566 |
# or procs is set to 0 (serial mode).
|
567 |
multithreading = procs != 0
|
568 |
+
if update_verbosity is None:
|
569 |
+
update_verbosity = verbosity
|
570 |
|
571 |
buffer_available = "buffer" in sys.stdout.__dir__()
|
572 |
|
|
|
645 |
weightSimplify=weightSimplify,
|
646 |
perturbationFactor=perturbationFactor,
|
647 |
verbosity=verbosity,
|
648 |
+
update_verbosity=update_verbosity,
|
649 |
progress=progress,
|
650 |
maxsize=maxsize,
|
651 |
fast_cycle=fast_cycle,
|
|
|
1053 |
|
1054 |
if not already_ran:
|
1055 |
Main.eval("using Pkg")
|
1056 |
+
io = "devnull" if self.params["update_verbosity"] == 0 else "stderr"
|
1057 |
io_arg = f"io={io}" if is_julia_version_greater_eq(Main, "1.6") else ""
|
1058 |
|
1059 |
Main.eval(
|
setup.py
CHANGED
@@ -8,7 +8,7 @@ except FileNotFoundError:
|
|
8 |
|
9 |
setuptools.setup(
|
10 |
name="pysr",
|
11 |
-
version="0.7.
|
12 |
author="Miles Cranmer",
|
13 |
author_email="miles.cranmer@gmail.com",
|
14 |
description="Simple and efficient symbolic regression",
|
|
|
8 |
|
9 |
setuptools.setup(
|
10 |
name="pysr",
|
11 |
+
version="0.7.1",
|
12 |
author="Miles Cranmer",
|
13 |
author_email="miles.cranmer@gmail.com",
|
14 |
description="Simple and efficient symbolic regression",
|