MilesCranmer commited on
Commit
49b163d
2 Parent(s): 134a0cd a465e93

Merge pull request #202 from MilesCranmer/fix-conda-forge

Browse files
.github/workflows/CI_conda_forge.yml CHANGED
@@ -1,6 +1,6 @@
1
  name: conda-forge
2
 
3
- # This CI tries the conda-forge version of PYSR
4
 
5
  on:
6
  schedule:
@@ -33,7 +33,6 @@ jobs:
33
  auto-activate-base: true
34
  python-version: ${{ matrix.python-version }}
35
  activate-environment: test
36
- use-mamba: ${{ matrix.use-mamba }}
37
  - name: "Install pysr with mamba"
38
  run: conda activate test && mamba install pysr
39
  if: ${{ matrix.use-mamba }}
@@ -41,4 +40,4 @@ jobs:
41
  run: conda activate test && conda install pysr
42
  if: ${{ !matrix.use-mamba }}
43
  - name: "Run tests"
44
- run: conda activate test && python3 -m unittest test.test && python3 -m unittest test.test_env
 
1
  name: conda-forge
2
 
3
+ # This CI tries the conda-forge version of PySR
4
 
5
  on:
6
  schedule:
 
33
  auto-activate-base: true
34
  python-version: ${{ matrix.python-version }}
35
  activate-environment: test
 
36
  - name: "Install pysr with mamba"
37
  run: conda activate test && mamba install pysr
38
  if: ${{ matrix.use-mamba }}
 
40
  run: conda activate test && conda install pysr
41
  if: ${{ !matrix.use-mamba }}
42
  - name: "Run tests"
43
+ run: conda activate test && python3 -m unittest test.test
pysr/sr.py CHANGED
@@ -523,8 +523,11 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
523
  Default gives the Python package directory, where a
524
  Project.toml file should be present from the install.
525
  update: bool
526
- Whether to automatically update Julia packages.
527
- Default is `True`.
 
 
 
528
  output_jax_format : bool
529
  Whether to create a 'jax_format' column in the output,
530
  containing jax-callable functions and the default parameters in
@@ -700,7 +703,7 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
700
  tempdir=None,
701
  delete_tempfiles=True,
702
  julia_project=None,
703
- update=True,
704
  output_jax_format=False,
705
  output_torch_format=False,
706
  extra_sympy_mappings=None,
@@ -1473,7 +1476,10 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
1473
  Main.eval(f"Pkg.resolve({io_arg})")
1474
  except (JuliaError, RuntimeError) as e:
1475
  raise ImportError(_import_error_string(julia_project)) from e
1476
- Main.eval("using SymbolicRegression")
 
 
 
1477
 
1478
  Main.plus = Main.eval("(+)")
1479
  Main.sub = Main.eval("(-)")
 
523
  Default gives the Python package directory, where a
524
  Project.toml file should be present from the install.
525
  update: bool
526
+ Whether to automatically update Julia packages when `fit` is called.
527
+ You should make sure that PySR is up-to-date itself first, as
528
+ the packaged Julia packages may not necessarily include all
529
+ updated dependencies.
530
+ Default is `False`.
531
  output_jax_format : bool
532
  Whether to create a 'jax_format' column in the output,
533
  containing jax-callable functions and the default parameters in
 
703
  tempdir=None,
704
  delete_tempfiles=True,
705
  julia_project=None,
706
+ update=False,
707
  output_jax_format=False,
708
  output_torch_format=False,
709
  extra_sympy_mappings=None,
 
1476
  Main.eval(f"Pkg.resolve({io_arg})")
1477
  except (JuliaError, RuntimeError) as e:
1478
  raise ImportError(_import_error_string(julia_project)) from e
1479
+ try:
1480
+ Main.eval("using SymbolicRegression")
1481
+ except (JuliaError, RuntimeError) as e:
1482
+ raise ImportError(_import_error_string(julia_project)) from e
1483
 
1484
  Main.plus = Main.eval("(+)")
1485
  Main.sub = Main.eval("(-)")
pysr/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "0.11.3"
2
  __symbolic_regression_jl_version__ = "0.12.2"
 
1
+ __version__ = "0.11.4"
2
  __symbolic_regression_jl_version__ = "0.12.2"