furax 0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- furax-0.7/.gitignore +19 -0
- furax-0.7/.gitlab-ci.yml +68 -0
- furax-0.7/.pre-commit-config.yaml +43 -0
- furax-0.7/PKG-INFO +140 -0
- furax-0.7/README.md +108 -0
- furax-0.7/pyproject.toml +114 -0
- furax-0.7/setup.cfg +4 -0
- furax-0.7/slurms/astro-sim-v100-run.slurm +47 -0
- furax-0.7/slurms/astro-sim-v100-testing.slurm +50 -0
- furax-0.7/src/furax/__init__.py +14 -0
- furax-0.7/src/furax/_base/__init__.py +0 -0
- furax-0.7/src/furax/_base/axes.py +293 -0
- furax-0.7/src/furax/_base/blocks.py +281 -0
- furax-0.7/src/furax/_base/config.py +60 -0
- furax-0.7/src/furax/_base/core.py +484 -0
- furax-0.7/src/furax/_base/dense.py +150 -0
- furax-0.7/src/furax/_base/diagonal.py +273 -0
- furax-0.7/src/furax/_base/linear.py +40 -0
- furax-0.7/src/furax/_base/rules.py +228 -0
- furax-0.7/src/furax/_base/utils.py +19 -0
- furax-0.7/src/furax/detectors.py +26 -0
- furax-0.7/src/furax/instruments/__init__.py +0 -0
- furax-0.7/src/furax/instruments/sat.py +66 -0
- furax-0.7/src/furax/landscapes.py +588 -0
- furax-0.7/src/furax/operators/__init__.py +35 -0
- furax-0.7/src/furax/operators/hwp.py +80 -0
- furax-0.7/src/furax/operators/polarizers.py +62 -0
- furax-0.7/src/furax/operators/projections.py +135 -0
- furax-0.7/src/furax/operators/qu_rotations.py +117 -0
- furax-0.7/src/furax/operators/toeplitz.py +250 -0
- furax-0.7/src/furax/samplings.py +39 -0
- furax-0.7/src/furax/toast/__init__.py +0 -0
- furax-0.7/src/furax/toast/obs_matrix.py +56 -0
- furax-0.7/src/furax/tree.py +192 -0
- furax-0.7/src/furax.egg-info/PKG-INFO +140 -0
- furax-0.7/src/furax.egg-info/SOURCES.txt +72 -0
- furax-0.7/src/furax.egg-info/dependency_links.txt +1 -0
- furax-0.7/src/furax.egg-info/requires.txt +18 -0
- furax-0.7/src/furax.egg-info/top_level.txt +1 -0
- furax-0.7/tests/__init__.py +0 -0
- furax-0.7/tests/_base/__init__.py +0 -0
- furax-0.7/tests/_base/axes/__init__.py +0 -0
- furax-0.7/tests/_base/axes/test_move_axis.py +71 -0
- furax-0.7/tests/_base/axes/test_ravel.py +151 -0
- furax-0.7/tests/_base/axes/test_reshape.py +133 -0
- furax-0.7/tests/_base/conftest.py +82 -0
- furax-0.7/tests/_base/test_add.py +189 -0
- furax-0.7/tests/_base/test_base.py +51 -0
- furax-0.7/tests/_base/test_blocks.py +268 -0
- furax-0.7/tests/_base/test_core.py +74 -0
- furax-0.7/tests/_base/test_dense.py +140 -0
- furax-0.7/tests/_base/test_diagonal.py +202 -0
- furax-0.7/tests/_base/test_inverse.py +27 -0
- furax-0.7/tests/_base/test_mul.py +53 -0
- furax-0.7/tests/_base/test_pack.py +267 -0
- furax-0.7/tests/_base/test_rules.py +144 -0
- furax-0.7/tests/_base/test_transpose.py +38 -0
- furax-0.7/tests/_base/test_utils.py +8 -0
- furax-0.7/tests/conftest.py +49 -0
- furax-0.7/tests/data/sat/norm_nHits_SA_35FOV_G_nside512.fits +0 -0
- furax-0.7/tests/helpers.py +13 -0
- furax-0.7/tests/operators/__init__.py +0 -0
- furax-0.7/tests/operators/test_decorators.py +91 -0
- furax-0.7/tests/operators/test_hwp.py +80 -0
- furax-0.7/tests/operators/test_polarizers.py +95 -0
- furax-0.7/tests/operators/test_projections.py +58 -0
- furax-0.7/tests/operators/test_qu_rotations.py +70 -0
- furax-0.7/tests/operators/test_toeplitz.py +114 -0
- furax-0.7/tests/test_landscapes.py +69 -0
- furax-0.7/tests/test_pytrees.py +244 -0
- furax-0.7/tests/test_solver.py +115 -0
- furax-0.7/tests/test_tree.py +161 -0
- furax-0.7/tests/toast/__init__.py +0 -0
- furax-0.7/tests/toast/test_obs_matrix.py +33 -0
furax-0.7/.gitignore
ADDED
furax-0.7/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
image: python:3.10
|
|
2
|
+
|
|
3
|
+
stages:
|
|
4
|
+
- testing
|
|
5
|
+
- qa
|
|
6
|
+
- publish
|
|
7
|
+
- docs
|
|
8
|
+
|
|
9
|
+
workflow:
|
|
10
|
+
rules:
|
|
11
|
+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
12
|
+
- if: '$CI_PIPELINE_SOURCE == "push" && ($CI_COMMIT_TAG != null || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH)'
|
|
13
|
+
|
|
14
|
+
variables:
|
|
15
|
+
PIP_CACHE_DIR: "${CI_PROJECT_DIR}/.cache/pip"
|
|
16
|
+
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
|
17
|
+
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
|
|
18
|
+
|
|
19
|
+
cache:
|
|
20
|
+
key: "${CI_JOB_NAME}"
|
|
21
|
+
paths:
|
|
22
|
+
- .cache/pip
|
|
23
|
+
|
|
24
|
+
.testing-unit:
|
|
25
|
+
stage: testing
|
|
26
|
+
before_script:
|
|
27
|
+
- pip install --upgrade pip
|
|
28
|
+
- pip install jax[cpu]
|
|
29
|
+
- pip install .[dev]
|
|
30
|
+
script:
|
|
31
|
+
- pytest -m "not slow"
|
|
32
|
+
rules:
|
|
33
|
+
- if: '$CI_COMMIT_TAG == null'
|
|
34
|
+
|
|
35
|
+
testing-unit/3.10:
|
|
36
|
+
extends: .testing-unit
|
|
37
|
+
image: python:3.10
|
|
38
|
+
coverage: '/^TOTAL.+?(\d+\%)$/'
|
|
39
|
+
|
|
40
|
+
testing-unit/3.11:
|
|
41
|
+
extends: .testing-unit
|
|
42
|
+
image: python:3.11
|
|
43
|
+
|
|
44
|
+
testing-unit/3.12:
|
|
45
|
+
extends: .testing-unit
|
|
46
|
+
image: python:3.12
|
|
47
|
+
|
|
48
|
+
pre-commits:
|
|
49
|
+
stage: qa
|
|
50
|
+
needs: []
|
|
51
|
+
before_script:
|
|
52
|
+
- pip install pre-commit
|
|
53
|
+
- pre-commit install
|
|
54
|
+
script:
|
|
55
|
+
- pre-commit run --all-files
|
|
56
|
+
rules:
|
|
57
|
+
- if: '$CI_COMMIT_TAG == null'
|
|
58
|
+
|
|
59
|
+
publish-release-package:
|
|
60
|
+
stage: publish
|
|
61
|
+
interruptible: true
|
|
62
|
+
before_script:
|
|
63
|
+
- pip install twine build setuptools_scm
|
|
64
|
+
script:
|
|
65
|
+
- python -m build
|
|
66
|
+
- TWINE_PASSWORD=$CI_JOB_TOKEN TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi dist/*.tar.gz dist/*.whl
|
|
67
|
+
rules:
|
|
68
|
+
- if: '$CI_COMMIT_TAG =~ /^v\d+\.\d+/'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/hadialqattan/pycln
|
|
3
|
+
rev: "v2.4.0"
|
|
4
|
+
hooks:
|
|
5
|
+
- id: pycln
|
|
6
|
+
args:
|
|
7
|
+
- --all
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
10
|
+
rev: v0.7.1
|
|
11
|
+
hooks:
|
|
12
|
+
- id: ruff
|
|
13
|
+
- id: ruff-format
|
|
14
|
+
|
|
15
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
16
|
+
rev: 'v4.6.0'
|
|
17
|
+
hooks:
|
|
18
|
+
- id: trailing-whitespace
|
|
19
|
+
- id: end-of-file-fixer
|
|
20
|
+
- id: check-yaml
|
|
21
|
+
- id: check-merge-conflict
|
|
22
|
+
|
|
23
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
24
|
+
rev: 'v1.11.1'
|
|
25
|
+
hooks:
|
|
26
|
+
- id: mypy
|
|
27
|
+
additional_dependencies:
|
|
28
|
+
- healpy
|
|
29
|
+
- jax
|
|
30
|
+
- jaxtyping
|
|
31
|
+
- jax-healpy
|
|
32
|
+
- jax-dataclasses
|
|
33
|
+
- lineax
|
|
34
|
+
- types-PyYAML
|
|
35
|
+
- scipy
|
|
36
|
+
args:
|
|
37
|
+
- --strict
|
|
38
|
+
- --show-error-codes
|
|
39
|
+
- --enable-error-code=ignore-without-code
|
|
40
|
+
- --allow-untyped-calls
|
|
41
|
+
files: ^src/furax/
|
|
42
|
+
|
|
43
|
+
exclude: '^slurms/'
|
furax-0.7/PKG-INFO
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: furax
|
|
3
|
+
Version: 0.7
|
|
4
|
+
Summary: Operators and solvers for high-performance computing.
|
|
5
|
+
Author-email: Pierre Chanial <chanial@apc.in2p3.fr>
|
|
6
|
+
Maintainer-email: Pierre Chanial <chanial@apc.in2p3.fr>
|
|
7
|
+
Project-URL: homepage, https://scipol.in2p3.fr
|
|
8
|
+
Project-URL: repository, https://github.com/CMBSciPol/furax
|
|
9
|
+
Keywords: scientific computing
|
|
10
|
+
Classifier: Programming Language :: Python
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: jaxtyping
|
|
18
|
+
Requires-Dist: healpy>=0.16.6
|
|
19
|
+
Requires-Dist: jax-healpy
|
|
20
|
+
Requires-Dist: jax-dataclasses
|
|
21
|
+
Requires-Dist: lineax
|
|
22
|
+
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: scipy
|
|
24
|
+
Requires-Dist: typing-extensions; python_version < "3.11"
|
|
25
|
+
Requires-Dist: matplotlib
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
29
|
+
Requires-Dist: pytest-mock; extra == "dev"
|
|
30
|
+
Requires-Dist: setuptools_scm; extra == "dev"
|
|
31
|
+
Requires-Dist: beartype; extra == "dev"
|
|
32
|
+
|
|
33
|
+
# Furax
|
|
34
|
+
|
|
35
|
+
Furax: a Framework for Unified and Robust data Analysis with JAX.
|
|
36
|
+
|
|
37
|
+
This framework provides building blocks for solving inverse problems, in particular in the astrophysical and cosmological domains.
|
|
38
|
+
|
|
39
|
+
## Installation of the stable packaged distribution
|
|
40
|
+
|
|
41
|
+
The GitLab repository is currently private and two pieces of information need to be specified: the URL of the repository and the credentials.
|
|
42
|
+
|
|
43
|
+
- Create a Personal Access Token by following these [instructions](https://gitlab.in2p3.fr/help/user/profile/personal_access_tokens).
|
|
44
|
+
For the name, choose something like `read scipol` and for the scopes, select `read_api`.
|
|
45
|
+
|
|
46
|
+
- Edit the file ~/.netrc to store the credentials
|
|
47
|
+
```
|
|
48
|
+
machine gitlab.in2p3.fr
|
|
49
|
+
login __token__
|
|
50
|
+
password <your-personal-access-token>
|
|
51
|
+
```
|
|
52
|
+
Make sure the .netrc file are appropriately set:
|
|
53
|
+
```commandline
|
|
54
|
+
chmod 600 ~/.netrc
|
|
55
|
+
```
|
|
56
|
+
- Edit ~/.config/pip/pip.conf
|
|
57
|
+
```
|
|
58
|
+
[global]
|
|
59
|
+
index-url = https://gitlab.in2p3.fr/api/v4/projects/26092/packages/pypi/simple
|
|
60
|
+
```
|
|
61
|
+
- After these steps are completed: you can install `furax` in the normal way:
|
|
62
|
+
```commandline
|
|
63
|
+
pip install furax
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Installation for development purposes
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
git clone git@github.com:CMBSciPol/furax.git
|
|
70
|
+
cd furax
|
|
71
|
+
python3 -m venv venv
|
|
72
|
+
source venv/bin/activate
|
|
73
|
+
pip install -e .[dev]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then [Install JAX](https://jax.readthedocs.io/en/latest/installation.html) according to the target architecture.
|
|
77
|
+
|
|
78
|
+
### Testing
|
|
79
|
+
To check that the package is correctly installed:
|
|
80
|
+
```bash
|
|
81
|
+
pytest
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Running on JeanZay
|
|
85
|
+
|
|
86
|
+
### Load cuda and and cudnn for JAX
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
module load cuda/11.8.0 cudnn/8.9.7.29-cuda
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Create Python env (only the first time)
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
module load python/3.10.4 && conda deactivate
|
|
96
|
+
python -m venv venv
|
|
97
|
+
source venv/bin/activate
|
|
98
|
+
# install jax
|
|
99
|
+
pip install --upgrade "jax[cuda11_local]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
|
|
100
|
+
# install furax
|
|
101
|
+
pip install -e .[dev]
|
|
102
|
+
```
|
|
103
|
+
### launch script
|
|
104
|
+
|
|
105
|
+
To launch only the pytests
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
sbatch slurms/astro-sim-v100-testing.slurm
|
|
109
|
+
```
|
|
110
|
+
To launch your own script
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
sbatch slurms/astro-sim-v100-run.slurm yourscript.py
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
You can also allocate ressources and go into bash mode
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
srun --pty --account=nih@v100 --nodes=1 --ntasks-per-node=1 --cpus-per-task=10 --gres=gpu:1 --hint=nomultithread bash
|
|
120
|
+
module purge
|
|
121
|
+
module load python/3.10.4
|
|
122
|
+
source venv/bin/activate
|
|
123
|
+
module load cuda/11.8.0 cudnn/8.9.7.29-cuda
|
|
124
|
+
# Then do your thing
|
|
125
|
+
python my_script.py
|
|
126
|
+
pytest
|
|
127
|
+
```
|
|
128
|
+
Don't leave the bash running !! (I would suggest running script with sbatch)
|
|
129
|
+
|
|
130
|
+
### Specific for nih / SciPol project
|
|
131
|
+
|
|
132
|
+
The repo is already in the commun WORK folder, the data is downloaded and the environment is ready.
|
|
133
|
+
|
|
134
|
+
You only need to do this
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
cd $ALL_CCFRWORK/furax-main
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Then launch scripts as you see fit
|
furax-0.7/README.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Furax
|
|
2
|
+
|
|
3
|
+
Furax: a Framework for Unified and Robust data Analysis with JAX.
|
|
4
|
+
|
|
5
|
+
This framework provides building blocks for solving inverse problems, in particular in the astrophysical and cosmological domains.
|
|
6
|
+
|
|
7
|
+
## Installation of the stable packaged distribution
|
|
8
|
+
|
|
9
|
+
The GitLab repository is currently private and two pieces of information need to be specified: the URL of the repository and the credentials.
|
|
10
|
+
|
|
11
|
+
- Create a Personal Access Token by following these [instructions](https://gitlab.in2p3.fr/help/user/profile/personal_access_tokens).
|
|
12
|
+
For the name, choose something like `read scipol` and for the scopes, select `read_api`.
|
|
13
|
+
|
|
14
|
+
- Edit the file ~/.netrc to store the credentials
|
|
15
|
+
```
|
|
16
|
+
machine gitlab.in2p3.fr
|
|
17
|
+
login __token__
|
|
18
|
+
password <your-personal-access-token>
|
|
19
|
+
```
|
|
20
|
+
Make sure the .netrc file are appropriately set:
|
|
21
|
+
```commandline
|
|
22
|
+
chmod 600 ~/.netrc
|
|
23
|
+
```
|
|
24
|
+
- Edit ~/.config/pip/pip.conf
|
|
25
|
+
```
|
|
26
|
+
[global]
|
|
27
|
+
index-url = https://gitlab.in2p3.fr/api/v4/projects/26092/packages/pypi/simple
|
|
28
|
+
```
|
|
29
|
+
- After these steps are completed: you can install `furax` in the normal way:
|
|
30
|
+
```commandline
|
|
31
|
+
pip install furax
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Installation for development purposes
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git clone git@github.com:CMBSciPol/furax.git
|
|
38
|
+
cd furax
|
|
39
|
+
python3 -m venv venv
|
|
40
|
+
source venv/bin/activate
|
|
41
|
+
pip install -e .[dev]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Then [Install JAX](https://jax.readthedocs.io/en/latest/installation.html) according to the target architecture.
|
|
45
|
+
|
|
46
|
+
### Testing
|
|
47
|
+
To check that the package is correctly installed:
|
|
48
|
+
```bash
|
|
49
|
+
pytest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Running on JeanZay
|
|
53
|
+
|
|
54
|
+
### Load cuda and and cudnn for JAX
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
module load cuda/11.8.0 cudnn/8.9.7.29-cuda
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Create Python env (only the first time)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
module load python/3.10.4 && conda deactivate
|
|
64
|
+
python -m venv venv
|
|
65
|
+
source venv/bin/activate
|
|
66
|
+
# install jax
|
|
67
|
+
pip install --upgrade "jax[cuda11_local]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
|
|
68
|
+
# install furax
|
|
69
|
+
pip install -e .[dev]
|
|
70
|
+
```
|
|
71
|
+
### launch script
|
|
72
|
+
|
|
73
|
+
To launch only the pytests
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
sbatch slurms/astro-sim-v100-testing.slurm
|
|
77
|
+
```
|
|
78
|
+
To launch your own script
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
sbatch slurms/astro-sim-v100-run.slurm yourscript.py
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
You can also allocate ressources and go into bash mode
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
srun --pty --account=nih@v100 --nodes=1 --ntasks-per-node=1 --cpus-per-task=10 --gres=gpu:1 --hint=nomultithread bash
|
|
88
|
+
module purge
|
|
89
|
+
module load python/3.10.4
|
|
90
|
+
source venv/bin/activate
|
|
91
|
+
module load cuda/11.8.0 cudnn/8.9.7.29-cuda
|
|
92
|
+
# Then do your thing
|
|
93
|
+
python my_script.py
|
|
94
|
+
pytest
|
|
95
|
+
```
|
|
96
|
+
Don't leave the bash running !! (I would suggest running script with sbatch)
|
|
97
|
+
|
|
98
|
+
### Specific for nih / SciPol project
|
|
99
|
+
|
|
100
|
+
The repo is already in the commun WORK folder, the data is downloaded and the environment is ready.
|
|
101
|
+
|
|
102
|
+
You only need to do this
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
cd $ALL_CCFRWORK/furax-main
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then launch scripts as you see fit
|
furax-0.7/pyproject.toml
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
build-backend = 'setuptools.build_meta'
|
|
3
|
+
requires = [
|
|
4
|
+
'setuptools==69.2.0',
|
|
5
|
+
'setuptools_scm[toml]>=6.2',
|
|
6
|
+
'wheel',
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
[project]
|
|
10
|
+
name = 'furax'
|
|
11
|
+
authors = [
|
|
12
|
+
{name = 'Pierre Chanial', email = 'chanial@apc.in2p3.fr'},
|
|
13
|
+
]
|
|
14
|
+
maintainers = [
|
|
15
|
+
{name = 'Pierre Chanial', email = 'chanial@apc.in2p3.fr'},
|
|
16
|
+
]
|
|
17
|
+
description = 'Operators and solvers for high-performance computing.'
|
|
18
|
+
readme = 'README.md'
|
|
19
|
+
keywords = [
|
|
20
|
+
'scientific computing',
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
'Programming Language :: Python',
|
|
24
|
+
'Programming Language :: Python :: 3',
|
|
25
|
+
'Intended Audience :: Science/Research',
|
|
26
|
+
'Operating System :: OS Independent',
|
|
27
|
+
'Topic :: Scientific/Engineering',
|
|
28
|
+
]
|
|
29
|
+
requires-python = '>=3.10'
|
|
30
|
+
license = {file = 'LICENSE'}
|
|
31
|
+
dependencies = [
|
|
32
|
+
'jaxtyping',
|
|
33
|
+
'healpy>=0.16.6',
|
|
34
|
+
'jax-healpy',
|
|
35
|
+
'jax-dataclasses',
|
|
36
|
+
'lineax',
|
|
37
|
+
'numpy',
|
|
38
|
+
'scipy',
|
|
39
|
+
'typing-extensions; python_version < "3.11"',
|
|
40
|
+
'matplotlib',
|
|
41
|
+
]
|
|
42
|
+
dynamic = ['version']
|
|
43
|
+
|
|
44
|
+
[project.optional-dependencies]
|
|
45
|
+
dev = [
|
|
46
|
+
'pytest',
|
|
47
|
+
'pytest-cov',
|
|
48
|
+
'pytest-mock',
|
|
49
|
+
'setuptools_scm',
|
|
50
|
+
'beartype',
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
[project.urls]
|
|
54
|
+
homepage = 'https://scipol.in2p3.fr'
|
|
55
|
+
repository = 'https://github.com/CMBSciPol/furax'
|
|
56
|
+
|
|
57
|
+
[tool.coverage.report]
|
|
58
|
+
exclude_lines = [
|
|
59
|
+
'pragma: no cover',
|
|
60
|
+
'except ImportError:',
|
|
61
|
+
'raise NotImplementedError',
|
|
62
|
+
'if typing.TYPE_CHECKING:',
|
|
63
|
+
]
|
|
64
|
+
show_missing = true
|
|
65
|
+
skip_covered = true
|
|
66
|
+
|
|
67
|
+
[[tool.mypy.overrides]]
|
|
68
|
+
module = [
|
|
69
|
+
'healpy',
|
|
70
|
+
'jax_healpy',
|
|
71
|
+
'lineax',
|
|
72
|
+
'scipy.stats.sampling'
|
|
73
|
+
]
|
|
74
|
+
ignore_missing_imports = true
|
|
75
|
+
|
|
76
|
+
[tool.pytest.ini_options]
|
|
77
|
+
# addopts = '-ra --cov=furax --jaxtyping-packages=furax,beartype.beartype(conf=beartype.BeartypeConf(strategy=beartype.BeartypeStrategy.On))'
|
|
78
|
+
addopts = '-s -ra'
|
|
79
|
+
testpaths = [
|
|
80
|
+
'tests',
|
|
81
|
+
]
|
|
82
|
+
markers = [
|
|
83
|
+
"slow: mark test as slow.",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
#[tool.setuptools]
|
|
87
|
+
#packages = ['src/furax']
|
|
88
|
+
|
|
89
|
+
[tool.setuptools_scm]
|
|
90
|
+
version_scheme = 'post-release'
|
|
91
|
+
fallback_version = '0.0.0'
|
|
92
|
+
|
|
93
|
+
[tool.ruff]
|
|
94
|
+
line-length = 100
|
|
95
|
+
|
|
96
|
+
[tool.ruff.lint]
|
|
97
|
+
select = [
|
|
98
|
+
# pycodestyle
|
|
99
|
+
'E',
|
|
100
|
+
# pyflakes
|
|
101
|
+
'F',
|
|
102
|
+
# pyupgrade
|
|
103
|
+
'UP',
|
|
104
|
+
# flake8-debugger
|
|
105
|
+
'T10',
|
|
106
|
+
]
|
|
107
|
+
ignore = ['E203', 'E731', 'E741', 'F722']
|
|
108
|
+
|
|
109
|
+
[tool.ruff.lint.per-file-ignores]
|
|
110
|
+
"src/furax/_base/core.py" = ['E743']
|
|
111
|
+
"src/furax/landscapes.py" = ['UP007']
|
|
112
|
+
|
|
113
|
+
[tool.ruff.format]
|
|
114
|
+
quote-style = 'single'
|
furax-0.7/setup.cfg
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#SBATCH --account=nih@v100
|
|
3
|
+
#SBATCH --job-name=astro-sim-run # Name of job
|
|
4
|
+
# Other partitions are usable by activating/uncommenting
|
|
5
|
+
# one of the 5 following directives:
|
|
6
|
+
#SBATCH -C v100-16g # decommenter pour reserver uniquement des GPU V100 16 Go
|
|
7
|
+
##SBATCH -C v100-32g # decommenter pour reserver uniquement des GPU V100 32 Go
|
|
8
|
+
##SBATCH --partition=gpu_p2 # decommenter pour la partition gpu_p2 (GPU V100 32 Go)
|
|
9
|
+
##SBATCH -C a100 # decommenter pour la partition gpu_p5 (GPU A100 80 Go)
|
|
10
|
+
# Ici, reservation de 8x10=80 CPU (4 taches par noeud) et de 8 GPU (4 GPU par noeud) sur 2 noeuds :
|
|
11
|
+
#SBATCH --nodes=1 # nombre de noeud
|
|
12
|
+
#SBATCH --ntasks=1
|
|
13
|
+
#SBATCH --ntasks-per-node=1 # nombre de tache MPI par noeud (= nombre de GPU par noeud)
|
|
14
|
+
#SBATCH --gres=gpu:1 # nombre de GPU par nœud (max 8 avec gpu_p2, gpu_p4, gpu_p5)
|
|
15
|
+
|
|
16
|
+
# Le nombre de CPU par tache doit etre adapte en fonction de la partition utilisee. Sachant
|
|
17
|
+
# qu'ici on ne reserve qu'un seul GPU par tache (soit 1/4 ou 1/8 des GPU du noeud suivant
|
|
18
|
+
# la partition), l'ideal est de reserver 1/4 ou 1/8 des CPU du noeud pour chaque tache:
|
|
19
|
+
#SBATCH --cpus-per-task=10 # nombre de CPU par tache (un quart du noeud ici)
|
|
20
|
+
##SBATCH --cpus-per-task=3 # nombre de CPU par tache pour gpu_p2 (1/8 du noeud 8-GPU)
|
|
21
|
+
##SBATCH --cpus-per-task=6 # nombre de CPU par tache pour gpu_p4 (1/8 du noeud 8-GPU)
|
|
22
|
+
##SBATCH --cpus-per-task=8 # nombre de CPU par tache pour gpu_p5 (1/8 du noeud 8-GPU)
|
|
23
|
+
# /!\ Attention, "multithread" fait reference a l'hyperthreading dans la terminologie Slurm
|
|
24
|
+
#SBATCH --hint=nomultithread # hyperthreading desactive
|
|
25
|
+
#SBATCH --time=01:00:00 # maximum execution time requested (HH:MM:SS)
|
|
26
|
+
## Use this if your code runs fast or you are in dev phase
|
|
27
|
+
##SBATCH --qos=qos_gpu-dev # quality of service (QOS) dev
|
|
28
|
+
#SBATCH --output=astro-sim-run.out # name of output file
|
|
29
|
+
#SBATCH --error=astro-sim-run.err # name of error file
|
|
30
|
+
# Cleans out modules loaded in interactive and inherited by default
|
|
31
|
+
module purge
|
|
32
|
+
|
|
33
|
+
# Uncomment the following module command if you are using the "gpu_p5" partition
|
|
34
|
+
# to have access to the modules compatible with this partition.
|
|
35
|
+
#module load cpuarch/amd
|
|
36
|
+
|
|
37
|
+
# Loading modules
|
|
38
|
+
module load python/3.10.4
|
|
39
|
+
source venv/bin/activate
|
|
40
|
+
|
|
41
|
+
module load cuda/11.8.0 cudnn/8.9.7.29-cuda
|
|
42
|
+
# Echo of launched commands
|
|
43
|
+
|
|
44
|
+
set -x
|
|
45
|
+
# For the "gpu_p5" partition, the code must be compiled with the compatible modules.
|
|
46
|
+
# Code execution with binding via bind_gpu.sh : 1 GPU per task
|
|
47
|
+
srun python $1
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
#SBATCH --account=nih@v100
|
|
3
|
+
#SBATCH --job-name=astro-sim-testing # Name of job
|
|
4
|
+
# Other partitions are usable by activating/uncommenting
|
|
5
|
+
# one of the 5 following directives:
|
|
6
|
+
#SBATCH -C v100-16g # decommenter pour reserver uniquement des GPU V100 16 Go
|
|
7
|
+
##SBATCH -C v100-32g # decommenter pour reserver uniquement des GPU V100 32 Go
|
|
8
|
+
##SBATCH --partition=gpu_p2 # decommenter pour la partition gpu_p2 (GPU V100 32 Go)
|
|
9
|
+
##SBATCH -C a100 # decommenter pour la partition gpu_p5 (GPU A100 80 Go)
|
|
10
|
+
# Ici, reservation de 8x10=80 CPU (4 taches par noeud) et de 8 GPU (4 GPU par noeud) sur 2 noeuds :
|
|
11
|
+
#SBATCH --nodes=1 # nombre de noeud
|
|
12
|
+
#SBATCH --ntasks=1
|
|
13
|
+
#SBATCH --ntasks-per-node=1 # nombre de tache MPI par noeud (= nombre de GPU par noeud)
|
|
14
|
+
#SBATCH --gres=gpu:4 # nombre de GPU par nœud (max 8 avec gpu_p2, gpu_p4, gpu_p5)
|
|
15
|
+
|
|
16
|
+
## this does not work
|
|
17
|
+
#SBATCH --gpus-per-task=4 # nombre de GPU par tache
|
|
18
|
+
|
|
19
|
+
# Le nombre de CPU par tache doit etre adapte en fonction de la partition utilisee. Sachant
|
|
20
|
+
# qu'ici on ne reserve qu'un seul GPU par tache (soit 1/4 ou 1/8 des GPU du noeud suivant
|
|
21
|
+
# la partition), l'ideal est de reserver 1/4 ou 1/8 des CPU du noeud pour chaque tache:
|
|
22
|
+
#SBATCH --cpus-per-task=10 # nombre de CPU par tache (un quart du noeud ici)
|
|
23
|
+
##SBATCH --cpus-per-task=3 # nombre de CPU par tache pour gpu_p2 (1/8 du noeud 8-GPU)
|
|
24
|
+
##SBATCH --cpus-per-task=6 # nombre de CPU par tache pour gpu_p4 (1/8 du noeud 8-GPU)
|
|
25
|
+
##SBATCH --cpus-per-task=8 # nombre de CPU par tache pour gpu_p5 (1/8 du noeud 8-GPU)
|
|
26
|
+
# /!\ Attention, "multithread" fait reference a l'hyperthreading dans la terminologie Slurm
|
|
27
|
+
#SBATCH --hint=nomultithread # hyperthreading desactive
|
|
28
|
+
#SBATCH --time=01:00:00 # maximum execution time requested (HH:MM:SS)
|
|
29
|
+
## Use this if your code runs fast or you are in dev phase
|
|
30
|
+
##SBATCH --qos=qos_gpu-dev # quality of service (QOS) dev
|
|
31
|
+
#SBATCH --output=astro-sim-testing.out # name of output file
|
|
32
|
+
#SBATCH --error=astro-sim-testing.err # name of error file
|
|
33
|
+
# Cleans out modules loaded in interactive and inherited by default
|
|
34
|
+
module purge
|
|
35
|
+
|
|
36
|
+
# Uncomment the following module command if you are using the "gpu_p5" partition
|
|
37
|
+
# to have access to the modules compatible with this partition.
|
|
38
|
+
#module load cpuarch/amd
|
|
39
|
+
|
|
40
|
+
# Loading modules
|
|
41
|
+
module load python/3.10.4
|
|
42
|
+
source venv/bin/activate
|
|
43
|
+
|
|
44
|
+
module load cuda/11.8.0 cudnn/8.9.7.29-cuda
|
|
45
|
+
# Echo of launched commands
|
|
46
|
+
|
|
47
|
+
set -x
|
|
48
|
+
# For the "gpu_p5" partition, the code must be compiled with the compatible modules.
|
|
49
|
+
# Code execution with binding via bind_gpu.sh : 1 GPU per task
|
|
50
|
+
srun python -m pytest -s
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from . import tree
|
|
2
|
+
from ._base.axes import MoveAxisOperator, RavelOperator, ReshapeOperator
|
|
3
|
+
from ._base.config import Config
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
# _base.config
|
|
7
|
+
'Config',
|
|
8
|
+
# tree
|
|
9
|
+
'tree',
|
|
10
|
+
# _base.axes
|
|
11
|
+
'MoveAxisOperator',
|
|
12
|
+
'RavelOperator',
|
|
13
|
+
'ReshapeOperator',
|
|
14
|
+
]
|
|
File without changes
|