Skip to content

What to do with VBuffer? #608

Closed
Closed
@eerhardt

Description

@eerhardt

VBuffer is a very critical, fundamental type in ML.NET. And as such, it has some critical performance considerations and characteristics it needs to adhere to.

However, it is not as intuitive of a type as it could be. We even wrote a Care and Feeding doc that describes some common pitfalls and other things to be aware of when using the type.

At its core, VBuffer has 2 responsibilities:

  1. It is a vector that can be either dense or sparse.
  2. It is a reusable/cached "buffer" to allow minimal allocations and garbage collections.

We should do some investigation into what types of improvements we can make to this type.

  • Is there something "base class library"-ish that can be introduced in .NET that would make this type better?
  • Are there alternative API designs that we should consider/incorporate here to make the type more intuitive and less error prone by users?
    • i.e. should some members be encapsulated?
    • Should we split VBuffer into two types SparseVector and DenseVector?

/cc @TomFinley @Zruty0

Metadata

Metadata

Assignees

Labels

APIIssues pertaining the friendly API

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions