Skip to content

Remove TextLoader.Read(string), promote IDataReader<MSS> extension #1797

Closed
@TomFinley

Description

@TomFinley

Pursuant to #1090 and #1041 there was agreement that we should be able to just pass a string into a data reader that reads from streams, rather than have to muck about with the creation of this IMultiStreamSource object.

As it happens, this one request was done in two separate ways:

  1. ML Context to create them all #1252 where this instance method on TextLoader was created:

public IDataView Read(string path) => Read(new MultiFileSource(path));

  1. Extension on IDataReader<IMultiStreamSource>, and DataReader<IMultiStreamSource, TShape> to read from one or several file paths, rather than requiring constructing an IMultiStreamSource #1281 where an extension method on top of IDataReader<IMultiStreamSource> was introduced.

Clearly we don't need both, and the second being more flexible and more broadly applicable was the one that should be checked in, so let us remove the class specific method introduced in #1252. The extension method should however be moved to a namespace where it is more likely to be picked up (probably Microsoft.ML) since right now it's a bit buried and generally people would never see this extension method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIssues pertaining the friendly APIgood first issueGood for newcomersup-for-grabsA good issue to fix if you are trying to contribute to the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions