Skip to content

Commit

Permalink
fix and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesse Schmidt committed May 31, 2024
1 parent c2472b1 commit 5c7a3bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 38 deletions.
2 changes: 1 addition & 1 deletion cmd/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func NewFlagSetBuilder(flagSet *pflag.FlagSet) *FlagSetBuilder {

// TODO: Should this be a list of IPs? Should we support IP:PORT?
func (fsb *FlagSetBuilder) AddSeedFlag() {
fsb.StringArrayP(flagNameSeeds, "s", []string{}, flags.DefaultWrapHelpString(fmt.Sprintf("The AVS seeds to use for cluster discovery. If no cluster discovery is needed (i.e. load-balancer) then use --%s", flagNameHost)))
fsb.StringArray(flagNameSeeds, []string{}, flags.DefaultWrapHelpString(fmt.Sprintf("The AVS seeds to use for cluster discovery. If no cluster discovery is needed (i.e. load-balancer) then use --%s", flagNameHost)))
}

func (fsb *FlagSetBuilder) AddHostFlag() {
Expand Down
39 changes: 2 additions & 37 deletions cmd/writers/indexList.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ func NewIndexTableWriter(writer io.Writer, verbose bool, logger *slog.Logger) *I

if verbose {
t.AppendHeader(table.Row{"Name", "Namespace", "Set", "Field", "Dimensions", "Distance Metric", "Unmerged", "Storage", "Index Parameters"}, rowConfigAutoMerge)
// t.AppendHeader(table.Row{"Name", "Namespace", "Set", "Field", "Dimensions", "Distance Metric", "Unmerged", "Storage", "Storage", "HNSW", "HNSW", "HNSW", "HNSW", "HNSW", "HNSW"}, rowConfigAutoMerge)
// t.AppendHeader(table.Row{"Name", "Namespace", "Set", "Field", "Dimensions", "Distance Metric", "Unmerged", "Namespace", "Set", "Max Edges", "Ef", "Construction Ef", "Batch", "Batch", "Batch"}, rowConfigAutoMerge)
// t.AppendHeader(table.Row{"Name", "Namespace", "Set", "Field", "Dimensions", "Distance Metric", "Unmerged", "Namespace", "Set", "Max Edges", "Ef", "Construction Ef", "Max Records", "Interval", "Disabled"})
} else {
t.AppendHeader(table.Row{"Name", "Namespace", "Set", "Field", "Dimensions", "Distance Metric", "Unmerged"})
}
Expand All @@ -40,37 +37,9 @@ func NewIndexTableWriter(writer io.Writer, verbose bool, logger *slog.Logger) *I
t.SetColumnConfigs([]table.ColumnConfig{
{

Number: 3,
// Name: "Set",
Number: 3,
Transformer: removeNil,
// AutoMerge: true,
},
// {
// Number: 8,
// Name: "Namespace",
// AutoMerge: true,
// },
// {
// Number: 9,
// Name: "Set",
// AutoMerge: true,
// },

// {Number: 1, AutoMerge: true},
// {Number: 2, AutoMerge: true},
// {Number: 3, AutoMerge: true},
// {Number: 4, AutoMerge: true},
// {Number: 5, AutoMerge: true},
// {Number: 6, AutoMerge: true},
// {Number: 7, AutoMerge: true},
// {Number: 8, AutoMerge: true},
// {Number: 9, AutoMerge: true},
// {Number: 10, AutoMerge: true},
// {Number: 11, AutoMerge: true},
// {Number: 12, AutoMerge: true},
// {Number: 13, AutoMerge: true},
// {Number: 14, AutoMerge: true},
// {Number: 15, AutoMerge: true},
})

return &t
Expand All @@ -87,7 +56,6 @@ func (itw *IndexTableWriter) AppendIndexRow(index *protos.IndexDefinition, statu
tStorage.AppendRow(table.Row{"Set", index.Storage.GetSet()})

row = append(row, tStorage.Render())
// row = append(row, status.GetUnmergedRecordCount(), index.Storage.GetNamespace(), index.Storage.GetSet())

switch v := index.Params.(type) {
case *protos.IndexDefinition_HnswParams:
Expand All @@ -99,11 +67,8 @@ func (itw *IndexTableWriter) AppendIndexRow(index *protos.IndexDefinition, statu
{"Construction Ef", v.HnswParams.GetEfConstruction()},
{"Batch Max Records", v.HnswParams.BatchingParams.GetMaxRecords()},
{"Batch Interval", v.HnswParams.BatchingParams.GetInterval()},
{"Batch Disabled", v.HnswParams.BatchingParams.GetDisabled()},
{"Batch Enabled", !v.HnswParams.BatchingParams.GetDisabled()},
})
// row = append(row, v.HnswParams.GetM(), v.HnswParams.GetEf(), v.HnswParams.GetEfConstruction(),
// v.HnswParams.BatchingParams.GetMaxRecords(), v.HnswParams.BatchingParams.GetInterval(),
// v.HnswParams.BatchingParams.GetDisabled())
row = append(row, tHNSW.Render())
default:
itw.logger.Warn("the server returned unrecognized index type params. recognized index param types are: HNSW")
Expand Down

0 comments on commit 5c7a3bd

Please sign in to comment.