MilesCranmer commited on
Commit
c01fb54
1 Parent(s): 1728868

Split CI into separate windows action

Browse files
.github/workflows/CI.yml CHANGED
@@ -25,7 +25,7 @@ jobs:
25
  matrix:
26
  julia-version: ['1.5.0', '1.6.1']
27
  python-version: ['3.6', '3.8']
28
- os: [ubuntu-latest, windows-latest]
29
 
30
  steps:
31
  - uses: actions/checkout@v1.0.0
@@ -65,11 +65,9 @@ jobs:
65
  run: coverage run --source=pysr --omit='*/feynman_problems.py' -m unittest test.test
66
  shell: bash
67
  - name: "Install JAX"
68
- if: matrix.os != 'windows-latest'
69
  run: pip install jax jaxlib # (optional import)
70
  shell: bash
71
  - name: "Run JAX tests"
72
- if: matrix.os != 'windows-latest'
73
  run: coverage run --append --source=pysr --omit='*/feynman_problems.py' -m unittest test.test_jax
74
  shell: bash
75
  - name: "Install Torch"
 
25
  matrix:
26
  julia-version: ['1.5.0', '1.6.1']
27
  python-version: ['3.6', '3.8']
28
+ os: [ubuntu-latest]
29
 
30
  steps:
31
  - uses: actions/checkout@v1.0.0
 
65
  run: coverage run --source=pysr --omit='*/feynman_problems.py' -m unittest test.test
66
  shell: bash
67
  - name: "Install JAX"
 
68
  run: pip install jax jaxlib # (optional import)
69
  shell: bash
70
  - name: "Run JAX tests"
 
71
  run: coverage run --append --source=pysr --omit='*/feynman_problems.py' -m unittest test.test_jax
72
  shell: bash
73
  - name: "Install Torch"
.github/workflows/CI_Windows.yml ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ on:
2
+ push:
3
+ branches:
4
+ - '*'
5
+ paths:
6
+ - 'test/**'
7
+ - 'pysr/**'
8
+ - '.github/workflows/**'
9
+ - 'setup.py'
10
+ - 'Project.toml'
11
+ pull_request:
12
+ branches:
13
+ - '*'
14
+ paths:
15
+ - 'test/**'
16
+ - 'pysr/**'
17
+ - '.github/workflows/**'
18
+ - 'setup.py'
19
+ - 'Project.toml'
20
+
21
+ jobs:
22
+ test:
23
+ runs-on: ${{ matrix.os }}
24
+ strategy:
25
+ matrix:
26
+ julia-version: ['1.5.0', '1.6.1']
27
+ python-version: ['3.6', '3.8']
28
+ os: [windows-latest]
29
+
30
+ steps:
31
+ - uses: actions/checkout@v1.0.0
32
+ - name: "Set up Julia"
33
+ uses: julia-actions/setup-julia@v1.6.0
34
+ with:
35
+ version: ${{ matrix.julia-version }}
36
+ - name: "Change package server"
37
+ shell: bash
38
+ env:
39
+ JULIA_PKG_SERVER: ""
40
+ run: |
41
+ julia -e 'using Pkg; Pkg.Registry.add("General")'
42
+ - name: "Cache dependencies"
43
+ uses: actions/cache@v1 # Thanks FromFile.jl
44
+ env:
45
+ cache-name: cache-artifacts
46
+ with:
47
+ path: ~/.julia/artifacts
48
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
49
+ restore-keys: |
50
+ ${{ runner.os }}-build-${{ env.cache-name }}-
51
+ ${{ runner.os }}-build-
52
+ ${{ runner.os }}-
53
+ - name: "Set up Python"
54
+ uses: actions/setup-python@v1
55
+ with:
56
+ python-version: ${{ matrix.python-version }}
57
+ - name: "Install PySR"
58
+ run: |
59
+ python -m pip install --upgrade pip
60
+ pip install -r requirements.txt
61
+ python setup.py install
62
+ - name: "Install Coverage tool"
63
+ run: pip install coverage coveralls
64
+ - name: "Run tests"
65
+ run: python -m unittest test.test
66
+ shell: bash
67
+ - name: "Install Torch"
68
+ run: pip install torch # (optional import)
69
+ shell: bash
70
+ - name: "Run Torch tests"
71
+ run: python -m unittest test.test_torch
72
+ shell: bash
pysr/sr.py CHANGED
@@ -293,7 +293,7 @@ def pysr(X, y, weights=None,
293
  warnings.warn("Note: you are running with more than 10,000 datapoints. You should consider turning on batching (https://pysr.readthedocs.io/en/latest/docs/options/#batching). You should also reconsider if you need that many datapoints. Unless you have a large amount of noise (in which case you should smooth your dataset first), generally < 10,000 datapoints is enough to find a functional form with symbolic regression. More datapoints will lower the search speed.")
294
 
295
  if maxsize > 40:
296
- warnings.warn("Note: Using a large maxsize for the equation search will be slow and use significant memory. You should consider turning `useFrequency` to False, and perhaps use `warmupMaxsizeBy`.")
297
 
298
  X, variable_names, selection = _handle_feature_selection(
299
  X, select_k_features,
 
293
  warnings.warn("Note: you are running with more than 10,000 datapoints. You should consider turning on batching (https://pysr.readthedocs.io/en/latest/docs/options/#batching). You should also reconsider if you need that many datapoints. Unless you have a large amount of noise (in which case you should smooth your dataset first), generally < 10,000 datapoints is enough to find a functional form with symbolic regression. More datapoints will lower the search speed.")
294
 
295
  if maxsize > 40:
296
+ warnings.warn("Note: Using a large maxsize for the equation search will be exponentially slower and use significant memory. You should consider turning `useFrequency` to False, and perhaps use `warmupMaxsizeBy`.")
297
 
298
  X, variable_names, selection = _handle_feature_selection(
299
  X, select_k_features,