-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Extension on IDataReader<IMultiStreamSource>, and DataReader<IMultiStreamSource, TShape> to read from one or several file paths, rather than requiring constructing an IMultiStreamSource #1281
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@TomFinley looking at the second part of your suggestion on #1041, on creating an extension on IDataReaderEstimator<IMultiStreamSource, ...>, would that be only for the Fit method? #Closed |
|
||
public static class LocalPathReader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LocalPathReader [](start = 24, length = 15)
I don't think it belongs to TextLoaderStatic
. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I just added an instance method to TextLoader
:)
In reply to: 226082986 [](ancestors = 226082986,226074992)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about updating the cookbook and associated test cases? In reply to: 430700966 [](ancestors = 430700966) |
The examples in the cookbook use Read in the DataReader type . Can't make an extension for that because of the TShape generic. In reply to: 430768483 [](ancestors = 430768483,430700966) |
Nevermind then. In reply to: 430771669 [](ancestors = 430771669,430768483,430700966) |
Nevermind == close this PR? In reply to: 430778815 [](ancestors = 430778815,430771669,430768483,430700966) |
Minor nit: The wording of the PR title might be confusing. When I first saw it, I thought that we allow reading of data from a |
if (concatenated != null && concatenated.Length > 1) | ||
{ | ||
if (paths.Length > 1) | ||
throw Contracts.Except($"Pass a single string to the {nameof(MultiFileSource)} constructor, if you are using wildcards."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to put this in xml doc comments. #Resolved
adding comments fixing tests that were using null files in the evaluator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @sfilipi looks great.
Addresses part of #1090 in this first iteration, by adding a Read extension method taking a string as param, on the IDataReader.
Still looking at how to make so all the derived classes of DataReader<IMultiStreamSource, TShape> can have a Read that takes a string as param.