Spaces:
Running
Running
MilesCranmer
commited on
Commit
β’
043980c
1
Parent(s):
fb8ee4a
Update installation guide
Browse files- .github/workflows/CI.yml +5 -7
- .github/workflows/CI_Windows.yml +2 -3
- .github/workflows/CI_large_nightly.yml +2 -3
- .github/workflows/CI_mac.yml +2 -3
- Dockerfile +1 -1
- README.md +10 -36
- pysr/test/incremental_install_simulator.dockerfile +2 -2
.github/workflows/CI.yml
CHANGED
@@ -58,9 +58,8 @@ jobs:
|
|
58 |
- name: "Install PySR"
|
59 |
run: |
|
60 |
python -m pip install --upgrade pip
|
61 |
-
pip install
|
62 |
-
python
|
63 |
-
python -m pysr install
|
64 |
- name: "Install Coverage tool"
|
65 |
run: pip install coverage coveralls
|
66 |
- name: "Run tests"
|
@@ -133,7 +132,7 @@ jobs:
|
|
133 |
- name: "Install PySR"
|
134 |
run: |
|
135 |
python3 -m pip install .
|
136 |
-
python3 -
|
137 |
- name: "Run tests"
|
138 |
run: cd /tmp && python -m pysr test main
|
139 |
|
@@ -177,9 +176,8 @@ jobs:
|
|
177 |
- name: "Install PySR and all dependencies"
|
178 |
run: |
|
179 |
python -m pip install --upgrade pip
|
180 |
-
|
181 |
-
|
182 |
-
python -m pip install .
|
183 |
- name: "Install additional dependencies"
|
184 |
run: python -m pip install jax jaxlib torch
|
185 |
if: ${{ matrix.python-version != '3.7' }}
|
|
|
58 |
- name: "Install PySR"
|
59 |
run: |
|
60 |
python -m pip install --upgrade pip
|
61 |
+
pip install .
|
62 |
+
python -c 'import pysr'
|
|
|
63 |
- name: "Install Coverage tool"
|
64 |
run: pip install coverage coveralls
|
65 |
- name: "Run tests"
|
|
|
132 |
- name: "Install PySR"
|
133 |
run: |
|
134 |
python3 -m pip install .
|
135 |
+
python3 -c 'import pysr'
|
136 |
- name: "Run tests"
|
137 |
run: cd /tmp && python -m pysr test main
|
138 |
|
|
|
176 |
- name: "Install PySR and all dependencies"
|
177 |
run: |
|
178 |
python -m pip install --upgrade pip
|
179 |
+
pip install .
|
180 |
+
pip install mypy
|
|
|
181 |
- name: "Install additional dependencies"
|
182 |
run: python -m pip install jax jaxlib torch
|
183 |
if: ${{ matrix.python-version != '3.7' }}
|
.github/workflows/CI_Windows.yml
CHANGED
@@ -52,9 +52,8 @@ jobs:
|
|
52 |
- name: "Install PySR"
|
53 |
run: |
|
54 |
python -m pip install --upgrade pip
|
55 |
-
pip install
|
56 |
-
python
|
57 |
-
python -m pysr install
|
58 |
- name: "Run tests"
|
59 |
run: |
|
60 |
python -m pysr test main
|
|
|
52 |
- name: "Install PySR"
|
53 |
run: |
|
54 |
python -m pip install --upgrade pip
|
55 |
+
pip install .
|
56 |
+
python -c 'import pysr'
|
|
|
57 |
- name: "Run tests"
|
58 |
run: |
|
59 |
python -m pysr test main
|
.github/workflows/CI_large_nightly.yml
CHANGED
@@ -40,9 +40,8 @@ jobs:
|
|
40 |
- name: "Install PySR"
|
41 |
run: |
|
42 |
python -m pip install --upgrade pip
|
43 |
-
pip install
|
44 |
-
python
|
45 |
-
python -m pysr install
|
46 |
- name: "Run tests"
|
47 |
run: |
|
48 |
python -m pysr test main
|
|
|
40 |
- name: "Install PySR"
|
41 |
run: |
|
42 |
python -m pip install --upgrade pip
|
43 |
+
pip install .
|
44 |
+
python -c 'import pysr'
|
|
|
45 |
- name: "Run tests"
|
46 |
run: |
|
47 |
python -m pysr test main
|
.github/workflows/CI_mac.yml
CHANGED
@@ -52,9 +52,8 @@ jobs:
|
|
52 |
- name: "Install PySR"
|
53 |
run: |
|
54 |
python -m pip install --upgrade pip
|
55 |
-
pip install
|
56 |
-
python
|
57 |
-
python -m pysr install
|
58 |
- name: "Run tests"
|
59 |
run: |
|
60 |
python -m pysr test main
|
|
|
52 |
- name: "Install PySR"
|
53 |
run: |
|
54 |
python -m pip install --upgrade pip
|
55 |
+
pip install .
|
56 |
+
python -c 'import pysr'
|
|
|
57 |
- name: "Run tests"
|
58 |
run: |
|
59 |
python -m pysr test main
|
Dockerfile
CHANGED
@@ -28,7 +28,7 @@ ADD ./pysr/ /pysr/pysr/
|
|
28 |
RUN pip3 install .
|
29 |
|
30 |
# Install Julia pre-requisites:
|
31 |
-
RUN python3 -
|
32 |
|
33 |
# metainformation
|
34 |
LABEL org.opencontainers.image.authors = "Miles Cranmer"
|
|
|
28 |
RUN pip3 install .
|
29 |
|
30 |
# Install Julia pre-requisites:
|
31 |
+
RUN python3 -c 'import pysr'
|
32 |
|
33 |
# metainformation
|
34 |
LABEL org.opencontainers.image.authors = "Miles Cranmer"
|
README.md
CHANGED
@@ -27,10 +27,6 @@ If you've finished a project with PySR, please submit a PR to showcase your work
|
|
27 |
- [Contributors](#contributors-)
|
28 |
- [Why PySR?](#why-pysr)
|
29 |
- [Installation](#installation)
|
30 |
-
- [pip](#pip)
|
31 |
-
- [conda](#conda)
|
32 |
-
- [docker](#docker-build)
|
33 |
-
- [Troubleshooting](#troubleshooting)
|
34 |
- [Quickstart](#quickstart)
|
35 |
- [β Documentation](https://astroautomata.com/PySR)
|
36 |
|
@@ -129,48 +125,31 @@ an explicit and powerful way to interpret deep neural networks.
|
|
129 |
|
130 |
## Installation
|
131 |
|
132 |
-
|
133 |
-
|:---:|:---:|:---:|
|
134 |
-
| Everywhere (recommended) | Linux and Intel-based macOS | Everywhere (if all else fails) |
|
135 |
|
136 |
-
|
137 |
-
|
138 |
-
### pip
|
139 |
|
140 |
-
1. [Install Julia](https://julialang.org/downloads/)
|
141 |
-
- Alternatively, my personal preference is to use [juliaup](https://github.com/JuliaLang/juliaup#installation), which performs this automatically.
|
142 |
-
2. Then, run:
|
143 |
```bash
|
144 |
-
|
145 |
```
|
146 |
-
3. Finally, to install Julia dependencies:
|
147 |
-
```bash
|
148 |
-
python3 -m pysr install
|
149 |
-
```
|
150 |
-
> (Alternatively, from within Python, you can call `import pysr; pysr.install()`)
|
151 |
|
152 |
-
|
153 |
|
154 |
-
###
|
155 |
|
156 |
-
|
157 |
|
158 |
```bash
|
159 |
conda install -c conda-forge pysr
|
160 |
```
|
161 |
|
162 |
-
from within your target conda environment.
|
163 |
|
164 |
-
|
165 |
-
start time may be slightly slower as the JIT-compilation will be running.
|
166 |
-
(Once the compilation finishes, there will not be a performance difference though.)
|
167 |
-
|
168 |
-
---
|
169 |
|
170 |
-
|
171 |
|
172 |
1. Clone this repo.
|
173 |
-
2.
|
174 |
```bash
|
175 |
docker build -t pysr .
|
176 |
```
|
@@ -185,11 +164,7 @@ For more details, see the [docker section](#docker).
|
|
185 |
|
186 |
### Troubleshooting
|
187 |
|
188 |
-
|
189 |
-
To debug this, try running `python3 -c 'import os; print(os.environ["PATH"])'`.
|
190 |
-
If none of these folders contain your Julia binary, then you need to add Julia's `bin` folder to your `PATH` environment variable.
|
191 |
-
|
192 |
-
Another issue you might run into can result in a hard crash at import with
|
193 |
a message like "`GLIBCXX_...` not found". This is due to another one of the Python dependencies
|
194 |
loading an incorrect `libstdc++` library. To fix this, you should modify your
|
195 |
`LD_LIBRARY_PATH` variable to reference the Julia libraries. For example, if the Julia
|
@@ -202,7 +177,6 @@ export LD_LIBRARY_PATH=$HOME/.julia/juliaup/julia-1.10.0+0.x64.linux.gnu/lib/jul
|
|
202 |
|
203 |
to your `.bashrc` or `.zshrc` file.
|
204 |
|
205 |
-
**Running PySR on macOS with an M1 processor:** you should use the pip version, and make sure to get the Julia binary for ARM/M-series processors.
|
206 |
|
207 |
## Quickstart
|
208 |
|
|
|
27 |
- [Contributors](#contributors-)
|
28 |
- [Why PySR?](#why-pysr)
|
29 |
- [Installation](#installation)
|
|
|
|
|
|
|
|
|
30 |
- [Quickstart](#quickstart)
|
31 |
- [β Documentation](https://astroautomata.com/PySR)
|
32 |
|
|
|
125 |
|
126 |
## Installation
|
127 |
|
128 |
+
### Pip
|
|
|
|
|
129 |
|
130 |
+
You can install PySR with pip:
|
|
|
|
|
131 |
|
|
|
|
|
|
|
132 |
```bash
|
133 |
+
pip install pysr
|
134 |
```
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
+
Julia dependencies will be installed at first import.
|
137 |
|
138 |
+
### Conda
|
139 |
|
140 |
+
Similarly, with conda:
|
141 |
|
142 |
```bash
|
143 |
conda install -c conda-forge pysr
|
144 |
```
|
145 |
|
|
|
146 |
|
147 |
+
### Docker
|
|
|
|
|
|
|
|
|
148 |
|
149 |
+
You can also use the `Dockerfile` to install PySR in a docker container
|
150 |
|
151 |
1. Clone this repo.
|
152 |
+
2. Within the repo's directory, build the docker container:
|
153 |
```bash
|
154 |
docker build -t pysr .
|
155 |
```
|
|
|
164 |
|
165 |
### Troubleshooting
|
166 |
|
167 |
+
One issue you might run into can result in a hard crash at import with
|
|
|
|
|
|
|
|
|
168 |
a message like "`GLIBCXX_...` not found". This is due to another one of the Python dependencies
|
169 |
loading an incorrect `libstdc++` library. To fix this, you should modify your
|
170 |
`LD_LIBRARY_PATH` variable to reference the Julia libraries. For example, if the Julia
|
|
|
177 |
|
178 |
to your `.bashrc` or `.zshrc` file.
|
179 |
|
|
|
180 |
|
181 |
## Quickstart
|
182 |
|
pysr/test/incremental_install_simulator.dockerfile
CHANGED
@@ -40,7 +40,7 @@ ADD ./pysr/ /pysr/pysr/
|
|
40 |
|
41 |
# First install of PySR:
|
42 |
RUN python3 -m pip install .
|
43 |
-
RUN python3 -
|
44 |
|
45 |
# Change Python version:
|
46 |
RUN pyenv install 3.10 && pyenv global 3.10 && pyenv uninstall -f 3.9.2
|
@@ -49,4 +49,4 @@ RUN python3 -m pip install --upgrade pip
|
|
49 |
# Second install of PySR:
|
50 |
RUN python3 -m pip install .
|
51 |
RUN rm -r ~/.julia/environments/pysr-*
|
52 |
-
RUN python3 -
|
|
|
40 |
|
41 |
# First install of PySR:
|
42 |
RUN python3 -m pip install .
|
43 |
+
RUN python3 -c 'import pysr'
|
44 |
|
45 |
# Change Python version:
|
46 |
RUN pyenv install 3.10 && pyenv global 3.10 && pyenv uninstall -f 3.9.2
|
|
|
49 |
# Second install of PySR:
|
50 |
RUN python3 -m pip install .
|
51 |
RUN rm -r ~/.julia/environments/pysr-*
|
52 |
+
RUN python3 -c 'import pysr'
|