{"id":26892007,"url":"https://github.com/dnv-opensource/axtreme","last_synced_at":"2025-05-12T14:11:30.990Z","repository":{"id":267452792,"uuid":"899469930","full_name":"dnv-opensource/axtreme","owner":"dnv-opensource","description":"Development repo for the RaPiD project with extensions for Ax and BoTorch.","archived":false,"fork":false,"pushed_at":"2025-05-12T05:40:05.000Z","size":200972,"stargazers_count":5,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-12T06:34:44.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dnv-opensource.github.io/axtreme/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dnv-opensource.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-06T10:31:16.000Z","updated_at":"2025-05-05T11:15:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6511b97-b350-4974-9d66-d7eb380864a2","html_url":"https://github.com/dnv-opensource/axtreme","commit_stats":null,"previous_names":["dnv-opensource/axtreme"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Faxtreme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Faxtreme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Faxtreme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dnv-opensource%2Faxtreme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dnv-opensource","download_url":"https://codeload.github.com/dnv-opensource/axtreme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253691653,"owners_count":21948310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-31T22:48:50.909Z","updated_at":"2025-05-12T14:11:30.984Z","avatar_url":"https://github.com/dnv-opensource.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![pypi](https://img.shields.io/pypi/v/axtreme.svg?color=blue)](https://pypi.python.org/pypi/axtreme)\r\n[![versions](https://img.shields.io/pypi/pyversions/axtreme.svg?color=blue)](https://pypi.python.org/pypi/axtreme)\r\n[![license](https://img.shields.io/pypi/l/axtreme.svg)](https://github.com/dnv-opensource/axtreme/blob/main/LICENSE)\r\n![ci](https://img.shields.io/github/actions/workflow/status/dnv-opensource/axtreme/.github%2Fworkflows%2Fnightly_build.yml?label=ci)\r\n[![docs](https://img.shields.io/github/actions/workflow/status/dnv-opensource/axtreme/.github%2Fworkflows%2Fpush_to_release.yml?label=docs)][axtreme_docs]\r\n\r\n# axtreme\r\nDevelopment repo for the RaPiD project with extensions for Ax and BoTorch.\r\n\r\n## Repo Structure\r\n* `src/`: Main package directory\r\n* `tests/`: Test directory\r\n* `examples/`: Examples and demos\r\n* `tutorials/`: Tutorial notebooks\r\n\r\n## Development Setup\r\n\r\n### 1. Install uv\r\nThis project uses `uv` as package manager.\r\nIf you haven't already, install [uv](https://docs.astral.sh/uv), preferably using it's [\"Standalone installer\"](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2) method: \u003cbr\u003e\r\n..on Windows:\r\n```sh\r\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\r\n```\r\n..on MacOS and Linux:\r\n```sh\r\ncurl -LsSf https://astral.sh/uv/install.sh | sh\r\n```\r\n(see [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/) for all / alternative installation methods.)\r\n\r\nOnce installed, you can update `uv` to its latest version, anytime, by running:\r\n```sh\r\nuv self update\r\n```\r\n\r\n### 2. Install Python\r\nThis project requires Python 3.11 or later. \u003cbr\u003e\r\nIf you don't already have a compatible version installed on your machine, the probably most comfortable way to install Python is through `uv`:\r\n```sh\r\nuv python install\r\n```\r\nThis will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.\r\n\r\nAlternatively, and if you want a standalone version of Python on your machine, you can install Python either via `winget`:\r\n```sh\r\nwinget install --id Python.Python\r\n```\r\nor you can download and install Python from the [python.org](https://www.python.org/downloads/) website.\r\n\r\n### 3. Clone the repository\r\nClone the axtreme repository into your local development directory:\r\n```sh\r\ngit clone https://github.com/dnv-opensource/axtreme path/to/your/dev/axtreme\r\n```\r\nChange into the project directory after cloning:\r\n```sh\r\ncd axtreme\r\n```\r\n\r\n### 4. Install dependencies\r\nRun `uv sync` to create a virtual environment and install all project dependencies into it:\r\n```sh\r\nuv sync\r\n```\r\n\u003e **Note**: Using `--no-dev` will omit installing development dependencies.\r\n\r\n\u003e **Note**: `uv` will create a new virtual environment called `.venv` in the project root directory when running\r\n\u003e `uv sync` the first time. Optionally, you can create your own virtual environment using e.g. `uv venv`, before running\r\n\u003e `uv sync`.\r\n\r\n### 5. (Optional) Install CUDA support\r\nRun `uv sync` with option `--extra cuda` to in addition install torch with CUDA support:\r\n```sh\r\nuv sync --extra cuda\r\n```\r\n\u003e **Note**: The exact version of `torch` that is installed by default depends on the system you are using. E.g., Linux\r\n\u003e will install the CUDA version by default, while Windows and macOS will install the CPU version.\r\n\r\n\r\nAlternatively, you can manually install torch with CUDA support.\r\n_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.\r\n\r\nTo 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](https://pytorch.org/get-started/locally/).\r\n_Note_: As we use `uv` as package manager, remember to replace `pip` in the command generated by the wizard with `uv pip`.\r\n\r\nIf you are on Windows, the resulting `uv pip install` command will most likely look something like this:\r\n```sh\r\nuv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124\r\n```\r\n\r\n_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](https://pytorch.org/get-started/locally/), select the cuda version that matches the major version of what your graphics driver supports (major version must match, minor version may deviate).\r\n\r\n\r\n### 6. (Optional) Activate the virtual environment\r\nWhen using `uv`, there is in almost all cases no longer a need to manually activate the virtual environment. \u003cbr\u003e\r\n`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:\r\n```sh\r\nuv run \u003ccommand\u003e\r\n```\r\n\r\nHowever, you still _can_ manually activate the virtual environment if needed.\r\nWhen developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings.\r\nTo manually activate the virtual environment, run one of the \"known\" legacy commands: \u003cbr\u003e\r\n..on Windows:\r\n```sh\r\n.venv\\Scripts\\activate.bat\r\n```\r\n..on Linux:\r\n```sh\r\nsource .venv/bin/activate\r\n```\r\n\r\n### 7. Install pre-commit hooks\r\n`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`.\r\nThe `.pre-commit-config.yaml` file in the project root directory contains a configuration for pre-commit hooks.\r\nTo install the pre-commit hooks defined therein in your local git repository, run:\r\n```sh\r\nuv run pre-commit install\r\n```\r\n\r\nAll pre-commit hooks configured in `.pre-commit-config.yaml` will now run each time you commit changes.\r\n\r\npre-commit can also manually be invoked, at anytime, using:\r\n```sh\r\nuv run pre-commit run --all-files\r\n```\r\n\r\nTo skip the pre-commit validation on commits (e.g. when intentionally committing broken code), run:\r\n```sh\r\nuv run git commit -m \u003cMSG\u003e --no-verify\r\n```\r\n\r\nTo update the hooks configured in `.pre-commit-config.yaml` to their newest versions, run:\r\n```sh\r\nuv run pre-commit autoupdate\r\n```\r\n\r\n### 8. Test that the installation works\r\nTo test that the installation works, run pytest in the project root folder:\r\n```sh\r\nuv run pytest\r\n```\r\n\r\nYou should now be ready to start developing!\r\n\r\n## Development Tools\r\nYou should familiarize yourself with the following tools used in this project. The tools can be configured in the `pyproject.toml` file;\r\n* ruff (linting + formatting)\r\n* mypy (static type checking)\r\n* pytest (unit testing)\r\n* pre-commit (code quality checks and fixes on commit)\r\n\r\nA brief overview of the tools is provided below:\r\n\r\n### ruff Formatter\r\nFormat the code according to the formatting rules in the `pyproject.toml` file:\r\n```sh\r\nuv run ruff format\r\n```\r\n\r\n### ruff Linter\r\nCheck the code for issues according to the linting rules in the `pyproject.toml` file:\r\n```sh\r\nuv run ruff check\r\n```\r\nFix any issues that can be fixed automatically:\r\n```sh\r\nuv run ruff check --fix\r\n```\r\n\r\n### mypy\r\nPerform static type checking on source code:\r\n```sh\r\nuv run mypy\r\n```\r\n\r\n### pytest\r\nRun all tests (with coverage) using:\r\n```sh\r\nuv run pytest\r\n```\r\nGenerate a coverage report in addition to running the tests:\r\n```sh\r\nuv run pytest --cov=rapid --cov-branch --cov-report=json --cov-report=term-missing\r\n```\r\n\r\n## Documentation\r\n\r\nSee axtreme's [documentation][axtreme_docs] on GitHub pages.\r\n\r\n\r\n## Meta\r\n\r\nCopyright (c) 2024 [DNV](https://www.dnv.com) AS. All rights reserved.\r\n\r\nSebastian Winter - sebastian.winter@dnv.com\r\n\r\nKristoffer Skare - kristoffer.skare@dnv.com\r\n\r\nMagnus Kristiansen - magnus.kristiansen@dnv.com\r\n\r\nDistributed under the MIT license. See [LICENSE](LICENSE.md) for more information.\r\n\r\n[https://github.com/dnv-opensource/axtreme](https://github.com/dnv-opensource/axtreme)\r\n\r\n## Contributing\r\n\r\n1. Fork it (\u003chttps://github.com/dnv-opensource/axtreme/fork\u003e) (Note: this is currently disabled for this repo. For DNV internal development, continue with the next step.)\r\n2. Create an issue in your GitHub repo\r\n3. Create your branch based on the issue number and type (`git checkout -b issue-name`)\r\n4. Evaluate and stage the changes you want to commit (`git add -i`)\r\n5. Commit your changes (`git commit -am 'place a descriptive commit message here'`)\r\n6. Push to the branch (`git push origin issue-name`)\r\n7. Create a new Pull Request in GitHub\r\n\r\nFor your contribution, please make sure you follow the [STYLEGUIDE](STYLEGUIDE.md) before creating the Pull Request.\r\n\r\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\r\n[axtreme_docs]: https://dnv-opensource.github.io/axtreme/README.html\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnv-opensource%2Faxtreme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdnv-opensource%2Faxtreme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdnv-opensource%2Faxtreme/lists"}