Skip to content
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

Fix TextLoader constructor and add exception message #3788

Merged
merged 4 commits into from
Jun 12, 2019

Conversation

artidoro
Copy link
Contributor

Fixes #3705.

In issue #3705 it appeared that the class defining the data was required to have both get and set auto-properties. In TextLoader however, we don't use the set property, so I removed that from the conditions.

Second, I added an exception message in case no public readable property or field is found in the class defining the data and no dataSample is passed to the constructor.

I added a related test which tests the various scenarios.

@artidoro artidoro self-assigned this May 29, 2019
@artidoro artidoro requested a review from codemzs May 29, 2019 23:29
@artidoro
Copy link
Contributor Author

I realize I need to use starts with, since the new line characters change for ubuntu/mac, which is what is causing the test failures.

Copy link

@yaeldekel yaeldekel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@artidoro artidoro merged commit 429f8cc into dotnet:master Jun 12, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Mar 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context.Data.CreateTextLoader<T> throws error Can't determine the number of source columns without valid data
3 participants