Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .cirun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
runners:
- name: aws-gpu-runner
cloud: aws
instance_type: g4dn.xlarge
machine_image: ami-067a4ba2816407ee9
region: eu-north-1
preemptible:
- true
- false
labels:
- cirun-aws-gpu
65 changes: 65 additions & 0 deletions .github/workflows/test-gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: GPU-CI

on:
push:
branches: [main]
pull_request:
types:
- labeled
- opened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
check:
name: "Triage: Check if GPU tests are allowed to run"
if: (!contains(github.event.pull_request.labels.*.name, 'skip-gpu-ci'))
runs-on: ubuntu-latest
steps:
- uses: flying-sheep/check@v1
with:
success: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-gpu-ci') }}
test:
name: GPU Tests
needs: check
runs-on: "cirun-aws-gpu--${{ github.run_id }}"
timeout-minutes: 30

defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Nvidia SMI sanity check
run: nvidia-smi

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: pyproject.toml

- name: Install fknni
run: uv pip install --system -e ".[test]"
- name: Pip list
run: pip list

- name: Run test
run: pytest -m gpu

- name: Remove 'run-gpu-ci' Label
if: always()
uses: actions-ecosystem/action-remove-labels@v1
with:
labels: "run-gpu-ci"
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
filter: blob:none
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v7
- name: Get test environments
id: get-envs
run: |
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning][].
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
[semantic versioning]: https://semver.org/spec/v2.0.0.html

## [1.3.0]

- Add GPU CI ([#15](https://github.com/zethson/fknni/pull/15)) @zethson
- Add support for 3D imputation ([#14](https://github.com/zethson/fknni/pull/14)) @zethson
- Require Python 3.12+ ([#13](https://github.com/zethson/fknni/pull/14)) @zethson

## [1.2.0]

- Iterative imputation for very sparse datasets
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Please refer to the [documentation][link-docs]. In particular, the

## Installation

You need to have Python 3.10 or newer installed on your system.
You need to have Python 3.12 or newer installed on your system.
If you don't have Python installed, we recommend installing [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).

Install the latest release of `fknni` from [PyPI](https://pypi.org/project/fknni):
Expand Down
10 changes: 10 additions & 0 deletions ci/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: fknni
channels:
- rapidsai
- nvidia
- conda-forge
dependencies:
- rapids=25.10
- python=3.13
- cuda-version=12.9
- cudnn
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,24 @@ optional-dependencies.doc = [
"sphinxcontrib-bibtex>=1",
"sphinxext-opengraph",
]
optional-dependencies.rapids12 = [
"cudf-cu12>=25.10",
"cugraph-cu12>=25.10",
"cuml-cu12>=25.10",
"cupy-cuda12x",
"cuvs-cu12>=25.10",
]
optional-dependencies.rapids13 = [
"cudf-cu13>=25.10",
"cugraph-cu13>=25.10",
"cuml-cu13>=25.10",
"cupy-cuda13x",
"cuvs-cu13>=25.10",
]
optional-dependencies.test = [
"coverage",
"pytest",
]

urls.Documentation = "https://fknni.readthedocs.io/"
urls.Homepage = "https://github.com/zethson/fknni"
urls.Source = "https://github.com/zethson/fknni"
Expand Down Expand Up @@ -130,6 +143,9 @@ xfail_strict = true
addopts = [
"--import-mode=importlib", # allow using test files with same name
]
markers = [
"gpu: mark test to run on GPU",
]

[tool.coverage.run]
source = [ "fknni" ]
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions tests/gpu/test_gpu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pytest


@pytest.mark.gpu
def test_gpu():
assert 1 + 1 == 2
Loading