From 53530b4e9a5542c57472d42d74cf23a2c23bb9b0 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 21 Aug 2025 08:42:36 +0200 Subject: [PATCH 1/7] The seventh revision --- README.md | 4 ++-- example/cmd/bench_pqivf.go | 2 +- example/cmd/pqivf.go | 2 +- example/cmd/pqivf_large.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6932263..c62d623 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ It can be used to add fast in-memory similarity search capabilities to your Go a - Unified interface for different indexes (see [core/index.go](core/index.go)) - Support for indexing and searching vectors of arbitrary dimension -- Fast distance computation using SIMD (AVX) instructions (see [core/simd_distance.c](core/simd_distance.c)) +- Fast distance computation using SIMD (AVX/AVX2) instructions (see [core/simd_distance.c](core/simd_distance.c)) - Support for bulk insertion, deletion, and updates - Support for saving indexes to disk and loading them back @@ -150,7 +150,7 @@ The index has the following configurable parameters: compression and accuracy at the cost of increased indexing time (typical range: 4–16). - **pqK**: Sets the number of codewords per subquantizer. Higher values increase accuracy and storage usage (typical value: 256). -- **kMeansIters**: Number of iterations used to train the product quantization codebooks (recommended value: 25). +- **kMeansIters**: Number of iterations used to train the product quantization codebooks (recommended value: 15). #### RPT Index diff --git a/example/cmd/bench_pqivf.go b/example/cmd/bench_pqivf.go index 6d409b1..26a254c 100644 --- a/example/cmd/bench_pqivf.go +++ b/example/cmd/bench_pqivf.go @@ -39,7 +39,7 @@ func BenchPQIVFIndexFashionMNIST() { coarseK := 16 numSubquantizers := 8 pqK := 256 - kMeansIters := 25 + kMeansIters := 10 return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters) } diff --git a/example/cmd/pqivf.go b/example/cmd/pqivf.go index 5ce9697..c3e18cc 100644 --- a/example/cmd/pqivf.go +++ b/example/cmd/pqivf.go @@ -28,7 +28,7 @@ func PQIVFIndexFashionMNIST() { coarseK := 16 numSubquantizers := 8 pqK := 256 - kMeansIters := 25 + kMeansIters := 10 return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters) } diff --git a/example/cmd/pqivf_large.go b/example/cmd/pqivf_large.go index 3a17152..7b13c1f 100644 --- a/example/cmd/pqivf_large.go +++ b/example/cmd/pqivf_large.go @@ -27,7 +27,7 @@ func PQIVFIndexGIST() { coarseK := 16 numSubquantizers := 8 pqK := 256 - kMeansIters := 25 + kMeansIters := 10 return pqivf.NewPQIVFIndex(dimension, coarseK, numSubquantizers, pqK, kMeansIters) } From 52171af37bf9a9137afcdd79b0750d221db37ed3 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 21 Aug 2025 09:08:48 +0200 Subject: [PATCH 2/7] WIP --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c62d623..d009017 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ The index has the following configurable parameters: compression and accuracy at the cost of increased indexing time (typical range: 4–16). - **pqK**: Sets the number of codewords per subquantizer. Higher values increase accuracy and storage usage (typical value: 256). -- **kMeansIters**: Number of iterations used to train the product quantization codebooks (recommended value: 15). +- **kMeansIters**: Number of iterations used to train the product quantization codebooks (recommended value: 25). #### RPT Index From e43795c2ed03e97437f1e9431bf6f08187cf899b Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Fri, 10 Oct 2025 22:32:37 +0200 Subject: [PATCH 3/7] Add issue templates --- .github/ISSUE_TEMPLATE/blank-issue.md | 8 ++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 24 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/blank-issue.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/blank-issue.md b/.github/ISSUE_TEMPLATE/blank-issue.md new file mode 100644 index 0000000..c59347f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/blank-issue.md @@ -0,0 +1,8 @@ +--- +name: Blank issue +about: Describe a new issue from scratch +title: '' +labels: '' +assignees: '' + +--- diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..3f31b87 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,24 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Logs** +If applicable, add logs to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 1cf546feda0442f3605c14902d9bf0368bbe52c1 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Sat, 11 Oct 2025 09:15:12 +0200 Subject: [PATCH 4/7] WIP --- .github/ISSUE_TEMPLATE/blank-issue.md | 8 -------- .github/ISSUE_TEMPLATE/config.yml | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/blank-issue.md diff --git a/.github/ISSUE_TEMPLATE/blank-issue.md b/.github/ISSUE_TEMPLATE/blank-issue.md deleted file mode 100644 index c59347f..0000000 --- a/.github/ISSUE_TEMPLATE/blank-issue.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: Blank issue -about: Describe a new issue from scratch -title: '' -labels: '' -assignees: '' - ---- diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0..0086358 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1 @@ -blank_issues_enabled: false +blank_issues_enabled: true From 8bf354486435214928e1bdf0521f8542c2aef390 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Thu, 23 Oct 2025 08:06:11 +0200 Subject: [PATCH 5/7] Update the issue templates --- .github/ISSUE_TEMPLATE/config.yml | 6 +++++- pyproject.toml | 7 +------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0086358..84b745a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,5 @@ -blank_issues_enabled: true +blank_issues_enabled: false +contact_links: + - name: Discussions + url: https://github.com/habedi/hann/discussions + about: Please ask and answer general questions here diff --git a/pyproject.toml b/pyproject.toml index 5c924aa..6f321b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,7 @@ [project] name = "hann" version = "0.1.0" -description = "Python environment for Hann" -readme = "README.md" -license = { text = "MIT" } -authors = [ - { name = "Hassan Abedi", email = "hassan.abedi.t@gmail.com" } -] +description = "The Python environment for the Hann project" requires-python = ">=3.10,<4.0" dependencies = [ From a33bd3dae5d210a53869be518726a91ecd31e86c Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Wed, 8 Jul 2026 22:03:01 +0200 Subject: [PATCH 6/7] WIP --- .editorconfig | 33 +++++++++++---------------------- .gitignore | 7 +++++-- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.editorconfig b/.editorconfig index e7f7227..21f8ed5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,38 +1,27 @@ -# EditorConfig is awesome: https://EditorConfig.org +# https://EditorConfig.org -# Top-most EditorConfig file root = true -# Global settings (applicable to all files unless overridden) [*] -charset = utf-8 # Default character encoding -end_of_line = lf # Use LF for line endings (Unix-style) -indent_style = space # Use spaces for indentation -indent_size = 4 # Default indentation size -insert_final_newline = true # Make sure files end with a newline -trim_trailing_whitespace = true # Remove trailing whitespace +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true -# Go files [*.go] max_line_length = 100 -# Markdown files [*.md] -max_line_length = 120 -trim_trailing_whitespace = false # Don't remove trailing whitespace in Markdown files +max_line_length = 150 +trim_trailing_whitespace = false -# Bash scripts -[*.sh] +[*.{yml,yaml,json}] indent_size = 2 -# YAML files -[*.{yml,yaml}] +[*.{c,h,sh}] indent_size = 2 -# C files -[*.{c,h}] -indent_size = 2 - -# Python files [*.py] max_line_length = 100 diff --git a/.gitignore b/.gitignore index d0d35d5..106aaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -83,11 +83,14 @@ template-go-project *.gob *.bin *.index -*.pb\.gz +*.pb.gz *_prof *_prof.go # Ignore the directories where the data for the examples is stored example/data/nearest-neighbors-datasets example/data/nearest-neighbors-datasets-large -*_output.txt +.codex +.claude/ +.agents/ +.antigravitycli/ From a6d15ad7dc517ea0f4620a4799a6dd340f094893 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Wed, 8 Jul 2026 22:05:24 +0200 Subject: [PATCH 7/7] Improve testing and linting workflows --- .github/workflows/lints.yml | 2 ++ .github/workflows/tests.yml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lints.yml b/.github/workflows/lints.yml index 71c42b3..5e2f870 100644 --- a/.github/workflows/lints.yml +++ b/.github/workflows/lints.yml @@ -6,6 +6,8 @@ on: branches: - main push: + branches: + - develop tags: - 'v*' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 64e3732..426dadd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,6 +6,8 @@ on: branches: - main push: + branches: + - develop tags: - 'v*' @@ -19,7 +21,7 @@ jobs: strategy: matrix: # Define the Go versions to test against - go-version: [ "1.21", "1.22", "1.23", "1.24" ] + go-version: [ "1.21", "1.22", "1.23", "1.24", "1.25", "1.26" ] steps: - name: Checkout Repository