axtreme

Development repo for the RaPiD project with extensions for Ax and BoTorch.

https://github.com/dnv-opensource/axtreme

Science Score: 44.0%

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

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

Repository

Development repo for the RaPiD project with extensions for Ax and BoTorch.

Basic Info
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 0
  • Open Issues: 11
  • Releases: 2
Created about 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

pypi versions license ci docs

axtreme

Development repo for the RaPiD project with extensions for Ax and BoTorch.

Repo Structure

  • src/: Main package directory
  • tests/: Test directory
  • examples/: Examples and demos
  • tutorials/: Tutorial notebooks

Development Setup

1. Install uv

This project uses uv as package manager. If you haven't already, install uv, preferably using it's "Standalone installer" method:
..on Windows: sh powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" ..on MacOS and Linux: sh curl -LsSf https://astral.sh/uv/install.sh | sh (see docs.astral.sh/uv for all / alternative installation methods.)

Once installed, you can update uv to its latest version, anytime, by running: sh uv self update

2. Install Python

This project requires Python 3.11 or later.
If you don't already have a compatible version installed on your machine, the probably most comfortable way to install Python is through uv: sh uv python install This will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.

Alternatively, and if you want a standalone version of Python on your machine, you can install Python either via winget: sh winget install --id Python.Python or you can download and install Python from the python.org website.

3. Clone the repository

Clone the axtreme repository into your local development directory: sh git clone https://github.com/dnv-opensource/axtreme path/to/your/dev/axtreme Change into the project directory after cloning: sh cd axtreme

4. Install dependencies

Run uv sync to create a virtual environment and install all project dependencies into it: sh uv sync

Note: Using --no-dev will omit installing development dependencies.

Note: uv will create a new virtual environment called .venv in the project root directory when running uv sync the first time. Optionally, you can create your own virtual environment using e.g. uv venv, before running uv sync.

5. (Optional) Install CUDA support

Run uv sync with option --extra cuda to in addition install torch with CUDA support: sh uv sync --extra cuda

Note: The exact version of torch that is installed by default depends on the system you are using. E.g., Linux will install the CUDA version by default, while Windows and macOS will install the CPU version.

Alternatively, you can manually install torch with CUDA support. Note 1: Do this preferably after running uv sync. That way you ensure a virtual environment exists, which is a prerequisite before you install torch with CUDA support using below uv pip install command.

To manually install torch with CUDA support, generate a uv pip install command matching your local machine's operating system using the wizard on the official PyTorch website. Note: As we use uv as package manager, remember to replace pip in the command generated by the wizard with uv pip.

If you are on Windows, the resulting uv pip install command will most likely look something like this: sh uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124

Hint: If you are unsure which cuda version to indicate in above uv pip install .. /cuXXX command, you can use the shell command nvidia-smi on your local system to find out the cuda version supported by the current graphics driver installed on your system. When then generating the uv pip install command with the wizard from the PyTorch website, select the cuda version that matches the major version of what your graphics driver supports (major version must match, minor version may deviate).

6. (Optional) Activate the virtual environment

When using uv, there is in almost all cases no longer a need to manually activate the virtual environment.
uv will find the .venv virtual environment in the working directory or any parent directory, and activate it on the fly whenever you run a command via uv inside your project folder structure: sh uv run <command>

However, you still can manually activate the virtual environment if needed. When developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings. To manually activate the virtual environment, run one of the "known" legacy commands:
..on Windows: sh .venv\Scripts\activate.bat ..on Linux: sh source .venv/bin/activate

7. Install pre-commit hooks

pre-commit can be used locally as a convenience tool to run checks such as pyright and ruff. If you choose to use it, you should check that the dependencies and versions match that in pyproject.toml. The .pre-commit-config.yaml file in the project root directory contains a configuration for pre-commit hooks. To install the pre-commit hooks defined therein in your local git repository, run: sh uv run pre-commit install

All pre-commit hooks configured in .pre-commit-config.yaml will now run each time you commit changes.

pre-commit can also manually be invoked, at anytime, using: sh uv run pre-commit run --all-files

To skip the pre-commit validation on commits (e.g. when intentionally committing broken code), run: sh uv run git commit -m <MSG> --no-verify

To update the hooks configured in .pre-commit-config.yaml to their newest versions, run: sh uv run pre-commit autoupdate

8. Test that the installation works

To test that the installation works, run pytest in the project root folder: sh uv run pytest

You should now be ready to start developing!

Development Tools

You should familiarize yourself with the following tools used in this project. The tools can be configured in the pyproject.toml file; * ruff (linting + formatting) * mypy (static type checking) * pytest (unit testing) * pre-commit (code quality checks and fixes on commit)

A brief overview of the tools is provided below:

ruff Formatter

Format the code according to the formatting rules in the pyproject.toml file: sh uv run ruff format

ruff Linter

Check the code for issues according to the linting rules in the pyproject.toml file: sh uv run ruff check Fix any issues that can be fixed automatically: sh uv run ruff check --fix

mypy

Perform static type checking on source code: sh uv run mypy

pytest

Run all tests (with coverage) using: sh uv run pytest Generate a coverage report in addition to running the tests: sh uv run pytest --cov=rapid --cov-branch --cov-report=json --cov-report=term-missing

Documentation

See axtreme's documentation on GitHub pages.

Meta

Copyright (c) 2024 DNV AS. All rights reserved.

Sebastian Winter - sebastian.winter@dnv.com

Kristoffer Skare - kristoffer.skare@dnv.com

Magnus Kristiansen - magnus.kristiansen@dnv.com

Distributed under the MIT license. See LICENSE for more information.

https://github.com/dnv-opensource/axtreme

Contributing

  1. Fork it (https://github.com/dnv-opensource/axtreme/fork) (Note: this is currently disabled for this repo. For DNV internal development, continue with the next step.)
  2. Create an issue in your GitHub repo
  3. Create your branch based on the issue number and type (git checkout -b issue-name)
  4. Evaluate and stage the changes you want to commit (git add -i)
  5. Commit your changes (git commit -am 'place a descriptive commit message here')
  6. Push to the branch (git push origin issue-name)
  7. Create a new Pull Request in GitHub

For your contribution, please make sure you follow the STYLEGUIDE before creating the Pull Request.

Owner

  • Name: DNV open source
  • Login: dnv-opensource
  • Kind: organization
  • Location: Norway

Open source from DNV

Citation (CITATION.cff)

title: Axtreme
version: 0.1.1
abstract: >-
  A toolkit for estimating the long term behaviour
  (extremes) of expensive, stochastic, black box functions.
type: software
authors:
  - name: DNV AS
    address: 'Veritasveien 1'
    post-code: '1363'
    city: Høvik
    country: NO
    website: 'https://www.dnv.com/'
  - given-names: Sebastian
    family-names: Winter
    affiliation: DNV
    email: sebastian.winter@dnv.com
  - given-names: Kristoffer
    family-names: Skare
    affiliation: DNV
    email: kristoffer.skare@dnv.com
  - given-names: Magnus
    family-names: Kristiansen
    affiliation: DNV
    email: magnus.kristiansen@dnv.com
keywords:
  - Design of Experiments
  - Active Learning
  - Extreme Response
license: MIT
license-url: 'https://dnv-opensource.github.io/axtreme/LICENSE.html'
url: 'https://dnv-opensource.github.io/axtreme/README.html'
repository-code: 'https://github.com/dnv-opensource/axtreme'
message: 'Please cite this software using these metadata.'
cff-version: 1.2.0

GitHub Events

Total
  • Create event: 36
  • Issues event: 68
  • Release event: 1
  • Watch event: 5
  • Delete event: 32
  • Member event: 2
  • Issue comment event: 25
  • Push event: 430
  • Public event: 1
  • Pull request review comment event: 203
  • Pull request review event: 186
  • Pull request event: 73
Last Year
  • Create event: 36
  • Issues event: 68
  • Release event: 1
  • Watch event: 5
  • Delete event: 32
  • Member event: 2
  • Issue comment event: 25
  • Push event: 430
  • Public event: 1
  • Pull request review comment event: 203
  • Pull request review event: 186
  • Pull request event: 73

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 49
  • Total pull requests: 89
  • Average time to close issues: 9 days
  • Average time to close pull requests: 4 days
  • Total issue authors: 5
  • Total pull request authors: 4
  • Average comments per issue: 0.27
  • Average comments per pull request: 0.19
  • Merged pull requests: 63
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 49
  • Pull requests: 89
  • Average time to close issues: 9 days
  • Average time to close pull requests: 4 days
  • Issue authors: 5
  • Pull request authors: 4
  • Average comments per issue: 0.27
  • Average comments per pull request: 0.19
  • Merged pull requests: 63
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • am-kaiser (24)
  • henrikstoklandberg (17)
  • swinter1 (5)
  • ClaasRostock (2)
  • mdmrah (1)
Pull Request Authors
  • am-kaiser (32)
  • henrikstoklandberg (27)
  • swinter1 (22)
  • ClaasRostock (8)
Top Labels
Issue Labels
Pull Request Labels
enhancement (1)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 22 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 2
pypi.org: axtreme

A development library for the RaPiD project

  • Homepage: https://github.com/dnv-opensource/axtreme
  • Documentation: https://dnv-opensource.github.io/axtreme/README.html
  • License: MIT License Copyright (c) 2024 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.1.1
    published about 1 year ago
  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 22 Last month
Rankings
Dependent packages count: 9.9%
Average: 32.8%
Dependent repos count: 55.8%
Maintainers (2)
Last synced: 6 months ago