https://github.com/alexhernandezgarcia/activelearning

https://github.com/alexhernandezgarcia/activelearning

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: alexhernandezgarcia
  • License: apache-2.0
  • Language: Jupyter Notebook
  • Default Branch: main
  • Size: 65.5 MB
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 1
  • Open Issues: 5
  • Releases: 0
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Multi-Fidelity Active Learning with GFlowNets

This repository extends the code used in the paper Multi-Fidelity Active Learning with GFLowNets, implemented in github.com/nikita-0209/mf-al-gfn.

Installation

If you simply want to install everything on a GPU-enabled machine, clone the repo and run install.sh:

bash git clone git@github.com:alexhernandezgarcia/activelearning.git cd activelearning source install.sh

  • This project requires Python 3.10 and CUDA 11.8.
  • It is also possible to install a CPU-only environment that supports most features (see below).
  • Setup is currently only supported on Ubuntu. It should also work on OSX, but you will need to handle the package dependencies.

Step by step installation

The following steps, as well as the script install.sh, assume the use of Python virtual environments for the installation.

  1. Ensure that you have Python 3.10 and, if you want to install GPU-enabled PyTorch, CUDA 11.8. In a cluster that uses modules, you may be able to load Python and CUDA with:

bash module load python/3.10 module load cuda/11.8

  1. Create and activate a Python virtual environment with venv. For example:

bash python -m venv activelearning-env source activelearning-env/bin/activate

  1. Install PyTorch 2.5.1.

For a CUDA-enabled installation:

bash python -m pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cu118 python -m pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.1+cu118.html

For a CPU-only installation:

bash python -m pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu python -m pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.1+cpu.html

  1. Install the rest of the dependencies:

bash python -m pip install .

The above command will install the minimum set of dependencies to run the core features of the activelearning package. Specific features require the installation of extra dependencies. Currently, these are the existing sets of extras:

  • dev: dependencies for development, such as linting and testing packages.
  • materials: dependencies for materials applications, such as the Crystal-GFN.

Extras can be installed by specifying the tags in square brackets:

bash python -m pip install .[dev]

or

bash python -m pip install .[dev,materials]

Installing with install.sh

The script install.sh simplifies the installation of a Python environment with the necessary or desired dependencies.

By default, running source install.sh will create a Python environment in `./activelearning-env with CUDA-enabled PyTorch and all the dependecies (all extras). However, the script admits the following arguments to modify the configuration of the environment:

  • --cpu: Install CPU-only PyTorch (mutually exclusive with --cuda).
  • --cuda: Install CUDA-enabled PyTorch (default, and mutually exclusive with --cpu).
  • --envpath PATH: Path of the Python virtual environment to be installed. Default: ./activelearning-env
  • --extras LIST: Comma-separated list of extras to install. Default: all. Options:
    • dev: dependencies for development, such as linting and testing packages.
    • materials: dependencies for materials applications, such as the Crystal-GFN.
    • all: all of the above
    • minimal: none of the above, that is the minimal set of dependencies.
  • --dry-run: Print the summary of the configuration selected and exit.
  • --help: Show the help message and exit.

For example, you may run:

bash source install.sh --cpu --envpath ~/myenvs/activelearning-env --extras dev,materials

to install an environment on ~/myenvs/activelearning-env, with a CPU-only PyTorch and the dev and materials extras.

Run Examples

To run the different examples you can use the following command:

bash python main.py user=<user-filename> +tests=branin

Pre-Defined Config Files

The following pre-defined config files are available: - branin - hartmann - ocp

Customize Config Options

Some config options can be customized independently of the task. Here is a list of possible options for each component: - sampler: random | greedy | randomgflownet | gflownet - selector: selector | score - surrogate: gp | dkl | svdklkernelwrapper - acquisition: botorchei | botorchmve | botorchnei - user: default | - logger: wandb | base

Citation

If you use this code for your own work, please consider citing our published work: @misc{hernandezgarcia2023multifidelity, title={Multi-Fidelity Active Learning with GFlowNets}, author={Alex Hernandez-Garcia and Nikita Saxena and Moksh Jain and Cheng-Hao Liu and Yoshua Bengio}, year={2023}, eprint={2306.11715}, archivePrefix={arXiv}, primaryClass={cs.LG} }

Owner

  • Name: Alex
  • Login: alexhernandezgarcia
  • Kind: user

Postdoc at Mila, Montreal. ML, computer vision, cognitive computational neuroscience, vision. Open Science. he/him/his.

GitHub Events

Total
  • Watch event: 1
  • Delete event: 2
  • Push event: 3
  • Pull request event: 5
  • Create event: 2
Last Year
  • Watch event: 1
  • Delete event: 2
  • Push event: 3
  • Pull request event: 5
  • Create event: 2

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 3
  • Total pull requests: 56
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 16 days
  • Total issue authors: 1
  • Total pull request authors: 4
  • Average comments per issue: 0.33
  • Average comments per pull request: 0.3
  • Merged pull requests: 49
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 23
  • Average time to close issues: N/A
  • Average time to close pull requests: 4 days
  • Issue authors: 0
  • Pull request authors: 3
  • Average comments per issue: 0
  • Average comments per pull request: 0.17
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • nikita-0209 (3)
Pull Request Authors
  • ginihumer (36)
  • nikita-0209 (29)
  • alexhernandezgarcia (16)
  • pchliu (2)
Top Labels
Issue Labels
Pull Request Labels
2 (1) 1 (1) draft (1)

Dependencies

pyproject.toml pypi