Skip to content

Commit

Permalink
rename python package to pyGGNN.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasRuppert committed Jan 22, 2025
1 parent 005271a commit 0bd7f23
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ if (nanobind_FOUND)
message(STATUS "building nanobind module")
nanobind_add_module(GGNN NB_STATIC NOMINSIZE "src/ggnn/python/nanobind.cu")
target_link_libraries(GGNN PRIVATE GGNNBase GGNNConstruction GGNNQuery glog::glog)
nanobind_add_stub(GGNN_stub MODULE GGNN OUTPUT GGNN.pyi MARKER_FILE py.typed DEPENDS GGNN)
nanobind_add_stub(pyGGNN_stub MODULE GGNN OUTPUT pyGGNN.pyi MARKER_FILE py.typed DEPENDS GGNN)

if (PY_BUILD_CMAKE_MODULE_NAME)
message(STATUS "configuring python module installation")
Expand All @@ -217,7 +217,7 @@ if (nanobind_FOUND)
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME})
endif()
install(FILES ${CMAKE_BINARY_DIR}/py.typed ${CMAKE_BINARY_DIR}/GGNN.pyi
install(FILES ${CMAKE_BINARY_DIR}/py.typed ${CMAKE_BINARY_DIR}/pyGGNN.pyi
EXCLUDE_FROM_ALL
COMPONENT python_modules
DESTINATION ${PY_BUILD_CMAKE_MODULE_NAME})
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The GGNN python module can be used to perform GPU-accelerated approximate neares
```python
#! /usr/bin/python3

import ggnn
import pyggnn as ggnn
import torch

# get detailed logs
Expand Down
6 changes: 3 additions & 3 deletions docs/source/usage_python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ By default, the log level is set to ``0``:
#! /usr/bin/python3
import ggnn
import pyggnn as ggnn
#get detailed logs
ggnn.set_log_level(4)
Expand Down Expand Up @@ -174,7 +174,7 @@ Otherwise, this works the same way as above.
#! /usr/bin/python3
import ggnn
import pyggnn as ggnn
import torch
# create data
Expand Down Expand Up @@ -224,7 +224,7 @@ and passed to the ``Evaluator`` directly.
#! /usr/bin/python3
import ggnn
import pyggnn as ggnn
path_to_dataset = '/path/to/sift/'
Expand Down
4 changes: 2 additions & 2 deletions examples/python/ggnn_pytorch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python3

import ggnn
import pyggnn as ggnn
import torch

# get detailed logs
Expand Down Expand Up @@ -36,5 +36,5 @@
evaluator = ggnn.Evaluator(base, query, gt_indices, k_query=k_query)
print(evaluator.evaluate_results(indices))

# print the indices of the 10 NN of the first five queries and their squared euclidean distances
# print the indices of the 10 NN of the first five queries and their squared euclidean distances
print('indices:', indices[:5], '\n squared dists:', dists[:5], '\n')
2 changes: 1 addition & 1 deletion examples/python/ggnn_pytorch_gpu_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python3

import ggnn
import pyggnn as ggnn
import torch

# get detailed logs
Expand Down
2 changes: 1 addition & 1 deletion examples/python/ggnn_pytorch_multi_gpu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python3

import ggnn
import pyggnn as ggnn
import torch

# create data
Expand Down
2 changes: 1 addition & 1 deletion examples/python/sift1m_fvecs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python3

import ggnn
import pyggnn as ggnn

path_to_dataset = '/graphics/scratch/datasets/ANN_datasets/SIFT1M/sift/'

Expand Down
2 changes: 1 addition & 1 deletion examples/python/sift1m_hdf5.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/python3

import ggnn
import pyggnn as ggnn

import h5py
import numpy as np
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project] # Project metadata
name = "GGNN"
name = "pyGGNN"
readme = "README.md"
requires-python = ">=3.8"
license = { "file" = "LICENSE" }
Expand Down Expand Up @@ -32,7 +32,7 @@ dynamic = ["version", "description"]

[project.urls]
Homepage = "https://github.com/cgtuebingen/ggnn"
# TODO: Documentation = "https://ggnn.readthedocs.io/"
Documentation = "https://ggnn.readthedocs.io/"

[build-system] # How pip and other frontends should build this project
requires = ["py-build-cmake~=0.3.3", "nanobind", "typing_extensions"]
Expand Down
File renamed without changes.

0 comments on commit 0bd7f23

Please sign in to comment.