Spaces:
Running
Running
Commit
·
925fb38
1
Parent(s):
eae8f9c
Fix unused arguments
Browse files- pysr/feynman_problems.py +3 -1
- pysr/sr.py +0 -8
pysr/feynman_problems.py
CHANGED
|
@@ -3,6 +3,7 @@ import csv
|
|
| 3 |
import traceback
|
| 4 |
from .sr import pysr, best
|
| 5 |
from pathlib import Path
|
|
|
|
| 6 |
|
| 7 |
PKG_DIR = Path(__file__).parents[1]
|
| 8 |
FEYNMAN_DATASET = PKG_DIR / "datasets" / "FeynmanEquations.csv"
|
|
@@ -136,7 +137,8 @@ def do_feynman_experiments_parallel(
|
|
| 136 |
pool = mp.Pool()
|
| 137 |
results = []
|
| 138 |
with tqdm(total=len(problems)) as pbar:
|
| 139 |
-
|
|
|
|
| 140 |
results.append(res)
|
| 141 |
pbar.update()
|
| 142 |
for res in results:
|
|
|
|
| 3 |
import traceback
|
| 4 |
from .sr import pysr, best
|
| 5 |
from pathlib import Path
|
| 6 |
+
from functools import partial
|
| 7 |
|
| 8 |
PKG_DIR = Path(__file__).parents[1]
|
| 9 |
FEYNMAN_DATASET = PKG_DIR / "datasets" / "FeynmanEquations.csv"
|
|
|
|
| 137 |
pool = mp.Pool()
|
| 138 |
results = []
|
| 139 |
with tqdm(total=len(problems)) as pbar:
|
| 140 |
+
f = partial(run_on_problem, verbosity=verbosity)
|
| 141 |
+
for i, res in enumerate(pool.imap(f, problems)):
|
| 142 |
results.append(res)
|
| 143 |
pbar.update()
|
| 144 |
for res in results:
|
pysr/sr.py
CHANGED
|
@@ -491,13 +491,9 @@ def _create_julia_files(
|
|
| 491 |
def_datasets,
|
| 492 |
hyperparam_filename,
|
| 493 |
def_hyperparams,
|
| 494 |
-
fractionReplaced,
|
| 495 |
-
ncyclesperiteration,
|
| 496 |
niterations,
|
| 497 |
npop,
|
| 498 |
runfile_filename,
|
| 499 |
-
topn,
|
| 500 |
-
verbosity,
|
| 501 |
julia_project,
|
| 502 |
procs,
|
| 503 |
weights,
|
|
@@ -609,12 +605,9 @@ def _make_hyperparams_julia_str(
|
|
| 609 |
parsimony,
|
| 610 |
perturbationFactor,
|
| 611 |
populations,
|
| 612 |
-
procs,
|
| 613 |
shouldOptimizeConstants,
|
| 614 |
unary_operators,
|
| 615 |
useFrequency,
|
| 616 |
-
use_custom_variable_names,
|
| 617 |
-
variable_names,
|
| 618 |
warmupMaxsizeBy,
|
| 619 |
weightAddNode,
|
| 620 |
ncyclesperiteration,
|
|
@@ -630,7 +623,6 @@ def _make_hyperparams_julia_str(
|
|
| 630 |
weightMutateOperator,
|
| 631 |
weightRandomize,
|
| 632 |
weightSimplify,
|
| 633 |
-
weights,
|
| 634 |
tournament_selection_n,
|
| 635 |
tournament_selection_p,
|
| 636 |
**kwargs,
|
|
|
|
| 491 |
def_datasets,
|
| 492 |
hyperparam_filename,
|
| 493 |
def_hyperparams,
|
|
|
|
|
|
|
| 494 |
niterations,
|
| 495 |
npop,
|
| 496 |
runfile_filename,
|
|
|
|
|
|
|
| 497 |
julia_project,
|
| 498 |
procs,
|
| 499 |
weights,
|
|
|
|
| 605 |
parsimony,
|
| 606 |
perturbationFactor,
|
| 607 |
populations,
|
|
|
|
| 608 |
shouldOptimizeConstants,
|
| 609 |
unary_operators,
|
| 610 |
useFrequency,
|
|
|
|
|
|
|
| 611 |
warmupMaxsizeBy,
|
| 612 |
weightAddNode,
|
| 613 |
ncyclesperiteration,
|
|
|
|
| 623 |
weightMutateOperator,
|
| 624 |
weightRandomize,
|
| 625 |
weightSimplify,
|
|
|
|
| 626 |
tournament_selection_n,
|
| 627 |
tournament_selection_p,
|
| 628 |
**kwargs,
|