Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
2fb18ff
1
Parent(s):
1b10c77
Printing within Jupyter Notebook
Browse files- pysr/sr.py +8 -1
- setup.py +1 -1
pysr/sr.py
CHANGED
@@ -423,10 +423,17 @@ const varMap = {'["' + '", "'.join(variable_names) + '"]'}"""
|
|
423 |
global_extra_sympy_mappings = extra_sympy_mappings
|
424 |
|
425 |
print("Running on", ' '.join(command))
|
426 |
-
process = subprocess.Popen(command)
|
427 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
process.wait()
|
429 |
except KeyboardInterrupt:
|
|
|
430 |
process.kill()
|
431 |
|
432 |
return get_hof()
|
|
|
423 |
global_extra_sympy_mappings = extra_sympy_mappings
|
424 |
|
425 |
print("Running on", ' '.join(command))
|
426 |
+
process = subprocess.Popen(command, stdout=subprocess.PIPE, bufsize=1)
|
427 |
try:
|
428 |
+
while True:
|
429 |
+
line = process.stdout.readline()
|
430 |
+
if not line: break
|
431 |
+
print(line.decode('utf-8').replace('\n', ''))
|
432 |
+
|
433 |
+
process.stdout.close()
|
434 |
process.wait()
|
435 |
except KeyboardInterrupt:
|
436 |
+
print("Killing process... will return when done.")
|
437 |
process.kill()
|
438 |
|
439 |
return get_hof()
|
setup.py
CHANGED
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
5 |
|
6 |
setuptools.setup(
|
7 |
name="pysr", # Replace with your own username
|
8 |
-
version="0.3.
|
9 |
author="Miles Cranmer",
|
10 |
author_email="[email protected]",
|
11 |
description="Simple and efficient symbolic regression",
|
|
|
5 |
|
6 |
setuptools.setup(
|
7 |
name="pysr", # Replace with your own username
|
8 |
+
version="0.3.28",
|
9 |
author="Miles Cranmer",
|
10 |
author_email="[email protected]",
|
11 |
description="Simple and efficient symbolic regression",
|