Skip to content

Commit

Permalink
Update warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Aug 4, 2023
1 parent ca6e959 commit d425a5f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pysr/sr.py
Expand Up @@ -1274,14 +1274,13 @@ def _validate_and_set_init_params(self):
# Ensure instance parameters are allowable values:
if self.tournament_selection_n > self.population_size:
raise ValueError(
"tournament_selection_n parameter must be smaller than population_size."
"`tournament_selection_n` parameter must be smaller than `population_size`."
)

if self.maxsize > 40:
warnings.warn(
"Note: Using a large maxsize for the equation search will be "
"exponentially slower and use significant memory. You should consider "
"turning `use_frequency` to False, and perhaps use `warmup_maxsize_by`."
"exponentially slower and use significant memory."
)
elif self.maxsize < 7:
raise ValueError("PySR requires a maxsize of at least 7")
Expand Down

0 comments on commit d425a5f

Please sign in to comment.