Skip to main content

Operators and solvers for high-performance computing.

Project description

Furax

Furax: a Framework for Unified and Robust data Analysis with JAX.

This framework provides building blocks for solving inverse problems, in particular in the astrophysical and cosmological domains.

Installation

You should always use a virtual environment to install packages (e.g. venv, conda environment, etc.).

Start by installing JAX for the target architecture.

Furax is available as furax on PyPI, and can be installed with:

pip install furax

Development version

Clone the repository, and navigate to the root directory of the project. For example:

git clone git@github.com:CMBSciPol/furax.git
cd furax

Then, install the package with:

pip install .

Developing Furax

After cloning, install in editable mode and with development dependencies:

pip install -e .[dev]

We use pytest for testing. You can run the tests with:

pytest

To ensure that your code passes the quality checks, you can use our pre-commit configuration:

  1. Install the pre-commit hooks with
pre-commit install
  1. That's it! Every commit will trigger the code quality checks.

Running on JeanZay

Load cuda and and cudnn for JAX

module load cuda/11.8.0 cudnn/8.9.7.29-cuda

Create Python env (only the first time)

module load python/3.10.4 && conda deactivate
python -m venv venv
source venv/bin/activate
# install jax
pip install --upgrade "jax[cuda11_local]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
# install furax
pip install -e .[dev]

launch script

To launch only the pytests

sbatch slurms/astro-sim-v100-testing.slurm

To launch your own script

sbatch slurms/astro-sim-v100-run.slurm yourscript.py

You can also allocate ressources and go into bash mode

srun --pty --account=nih@v100 --nodes=1 --ntasks-per-node=1 --cpus-per-task=10 --gres=gpu:1 --hint=nomultithread bash
module purge
module load python/3.10.4
source venv/bin/activate
module load cuda/11.8.0  cudnn/8.9.7.29-cuda
# Then do your thing
python my_script.py
pytest

Don't leave the bash running !! (I would suggest running script with sbatch)

Specific for nih / SciPol project

The repo is already in the commun WORK folder, the data is downloaded and the environment is ready.

You only need to do this

cd $ALL_CCFRWORK/furax-main

Then launch scripts as you see fit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

furax-0.8.tar.gz (4.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

furax-0.8-py3-none-any.whl (50.3 kB view details)

Uploaded Python 3

File details

Details for the file furax-0.8.tar.gz.

File metadata

  • Download URL: furax-0.8.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for furax-0.8.tar.gz
Algorithm Hash digest
SHA256 77a6d3fcefc8fd84adaed87bdd3b16d035047d339e1ed93a725093a7fef077e8
MD5 75854bc8898adbde1c900ba0148dc9b9
BLAKE2b-256 1e2f6175e82e9a374717326259dd9c91ffe6a135f745f14bbb50b727d12b281d

See more details on using hashes here.

Provenance

The following attestation bundles were made for furax-0.8.tar.gz:

Publisher: release.yml on CMBSciPol/furax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file furax-0.8-py3-none-any.whl.

File metadata

  • Download URL: furax-0.8-py3-none-any.whl
  • Upload date:
  • Size: 50.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for furax-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0a43962d714df3a81d6bae701ebac8d8e72611653477c61789ce7138a5488c14
MD5 6ca4c55730213283e7f747b3c81eeceb
BLAKE2b-256 2692273a1b359fccaab1032fe2e2181f13f2e11f3b147695612831de446ef5c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for furax-0.8-py3-none-any.whl:

Publisher: release.yml on CMBSciPol/furax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page