Skip to content

Commit

Permalink
fix gc
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Aug 12, 2024
1 parent 184ad23 commit 8a1e363
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pysr/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from .feature_selection import run_feature_selection
from .julia_extensions import load_required_packages
from .julia_helpers import (
PythonCall,
_escape_filename,
_load_cluster_manager,
jl_array,
Expand Down Expand Up @@ -1885,6 +1886,7 @@ def _run(
else:
jl_y_variable_names = None

PythonCall.GC.disable()
out = SymbolicRegression.equation_search(
jl_X,
jl_y,
Expand All @@ -1911,6 +1913,7 @@ def _run(
progress=progress and self.verbosity > 0 and len(y.shape) == 1,
verbosity=int(self.verbosity),
)
PythonCall.GC.enable()

self.julia_state_stream_ = jl_serialize(out)

Expand Down

0 comments on commit 8a1e363

Please sign in to comment.