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
4 changes: 2 additions & 2 deletions .github/workflows/test-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: nvidia-smi

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

Expand All @@ -50,7 +50,7 @@ jobs:
cache-dependency-glob: pyproject.toml

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

Expand Down
10 changes: 0 additions & 10 deletions ci/environment.yml

This file was deleted.

14 changes: 7 additions & 7 deletions docs/notebooks/faiss.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-25T13:28:24.303873023Z",
Expand All @@ -40,7 +40,7 @@
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"from fknni import FaissImputer\n",
"from fknni import FastKNNImputer\n",
"from sklearn.impute import KNNImputer"
]
},
Expand Down Expand Up @@ -795,7 +795,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-25T13:28:24.316976982Z",
Expand All @@ -822,7 +822,7 @@
}
],
"source": [
"faiss_imputer = FaissImputer(n_neighbors=5, strategy=\"weighted\")\n",
"faiss_imputer = FastKNNImputer(n_neighbors=5, strategy=\"weighted\")\n",
"\n",
"df_imputed_faiss = faiss_imputer.fit_transform(df_missing)\n",
"df_imputed_faiss"
Expand Down Expand Up @@ -965,7 +965,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2024-04-25T13:29:06.633118482Z",
Expand Down Expand Up @@ -998,7 +998,7 @@
"X.values[np.unravel_index(missing_indices, X.shape)] = np.nan\n",
"\n",
"knn_imputer = KNNImputer(n_neighbors=5)\n",
"faiss_imputer = FaissImputer(n_neighbors=5)\n",
"faiss_imputer = FastKNNImputer(n_neighbors=5)\n",
"\n",
"start_time = time.time()\n",
"knn_imputed = knn_imputer.fit_transform(X)\n",
Expand All @@ -1009,7 +1009,7 @@
"faiss_time = time.time() - start_time\n",
"\n",
"times = [knn_time, faiss_time]\n",
"labels = [\"scikit-learn KNNImputer\", \"FaissImputer\"]\n",
"labels = [\"scikit-learn KNNImputer\", \"FastKNNImputer\"]\n",
"plt.bar(labels, times, color=[\"blue\", \"green\"])\n",
"plt.ylabel(\"Time in seconds\")\n",
"plt.title(\"Imputation Time Comparison for 10000 samples and 50 features with 10% missing rate\")\n",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.13",
]
dependencies = [
"lamin-utils",
"array-api-compat",
"pandas",
"scikit-learn",
]
Expand Down
6 changes: 3 additions & 3 deletions src/fknni/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from importlib.metadata import version

__all__ = ["faiss"]
__version__ = version("fknni")

from .faiss import FaissImputer
from .knn import FastKNNImputer

__version__ = version("fknni")
__all__ = ["FastKNNImputer", "FaissImputer"]
1 change: 0 additions & 1 deletion src/fknni/faiss/__init__.py

This file was deleted.

266 changes: 0 additions & 266 deletions src/fknni/faiss/faiss.py

This file was deleted.

1 change: 1 addition & 0 deletions src/fknni/knn/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .knn import FastKNNImputer
Loading
Loading