Skip to content

Commit

Permalink
Adding formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
codetalker7 committed Sep 8, 2024
1 parent a631f2a commit 1bda1a8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ indexer = Indexer(config)
# then big example
config = ColBERTConfig(
use_gpu = true,
checkpoint = "/home/codetalker7/models/colbertv2.0/",
collection = "./downloads/lotte/lifestyle/dev/collection.tsv",
index_path = "./lotte_lifestyle_index/"
)
Expand Down
2 changes: 1 addition & 1 deletion src/savers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function save_chunk_metadata_property(
index_path::String, property::String, properties::Vector{T}) where {T}
plan_metadata = JSON.parsefile(joinpath(index_path, "plan.json"))
@assert plan_metadata["num_chunks"] == length(properties)
for chunk_idx in 1:length(properties)
for chunk_idx in 1:length(properties)
chunk_metadata = JSON.parsefile(joinpath(
index_path, "$(chunk_idx).metadata.json"))
chunk_metadata[property] = properties[chunk_idx]
Expand Down
2 changes: 1 addition & 1 deletion test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ end
@testset "kmeans_gpu_onehot!" begin
# Test 1: When all points are centroids
data = rand(Float32, rand(1:100), rand(1:100))
centroids = similar(data)
centroids = similar(data)
point_bsize = rand(1:size(data, 2))
cluster_ids = kmeans_gpu_onehot!(data, centroids, size(data, 2))
@test isequal(centroids[:, cluster_ids], data)
Expand Down

0 comments on commit 1bda1a8

Please sign in to comment.