Skip to content

Commit e8da5a0

Browse files
committed
Refactoring
1 parent c5be3f5 commit e8da5a0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

examples/git_tester.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
rm_dir_cmd = "rm -rf"
1212

1313
speedtest_src_path = os.path.join("examples", "speedtest.py")
14-
speedtest_path = os.path.join("examples", "speedtest2.py")
15-
os.system(f"{copy_cmd} {speedtest_src_path} {speedtest_path}") # the file has to be outside of git
14+
speedtest_copy_path = os.path.join("examples", "speedtest2.py")
15+
os.system(f"{copy_cmd} {speedtest_src_path} {speedtest_copy_path}") # the file has to be outside of git
1616

1717
commits = list(Repository('.', from_tag="v0.6.0").traverse_commits())
1818
print("Found commits:")
@@ -37,8 +37,8 @@
3737
print("build failed!!!!")
3838
continue
3939

40-
os.system(f'python {speedtest_path} -n "{name}" -d 4 -t 1')
41-
os.system(f'python {speedtest_path} -n "{name}" -d 64 -t 1')
42-
os.system(f'python {speedtest_path} -n "{name}" -d 128 -t 1')
43-
os.system(f'python {speedtest_path} -n "{name}" -d 4 -t 24')
44-
os.system(f'python {speedtest_path} -n "{name}" -d 128 -t 24')
40+
os.system(f'python {speedtest_copy_path} -n "{name}" -d 4 -t 1')
41+
os.system(f'python {speedtest_copy_path} -n "{name}" -d 64 -t 1')
42+
os.system(f'python {speedtest_copy_path} -n "{name}" -d 128 -t 1')
43+
os.system(f'python {speedtest_copy_path} -n "{name}" -d 4 -t 24')
44+
os.system(f'python {speedtest_copy_path} -n "{name}" -d 128 -t 24')

python_bindings/bindings.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class Index {
155155

156156
void loadIndex(const std::string &path_to_index, size_t max_elements) {
157157
if (appr_alg) {
158-
std::cerr<<"Warning: Calling load_index for an already inited index. Old index is being deallocated.";
158+
std::cerr << "Warning: Calling load_index for an already inited index. Old index is being deallocated." << std::endl;
159159
delete appr_alg;
160160
}
161161
appr_alg = new hnswlib::HierarchicalNSW<dist_t>(l2space, path_to_index, false, max_elements);
@@ -768,7 +768,7 @@ class BFIndex {
768768

769769
void loadIndex(const std::string &path_to_index, size_t max_elements) {
770770
if (alg) {
771-
std::cerr<<"Warning: Calling load_index for an already inited index. Old index is being deallocated.";
771+
std::cerr << "Warning: Calling load_index for an already inited index. Old index is being deallocated." << std::endl;
772772
delete alg;
773773
}
774774
alg = new hnswlib::BruteforceSearch<dist_t>(space, path_to_index);

0 commit comments

Comments
 (0)