Skip to content

Conversation

@artidoro
Copy link
Contributor

@artidoro artidoro commented Jan 4, 2019

Part of the effort described in #1971.

This PR removes Legacy code in ML.TestFramework and ML.FSharp.Tests, and replaces it with the new Estimator, Transformer API. Specifically, it changes tests that were using ModelHelper.cs (although those tests were skipped anyway as the dataset is missing). It also changes the F# code in the F# smoke tests to use the new API.

I checked the code coverage effect of this PR, and it increases the coverage by 0.02% (possibly for deleting test utility code that was not used).

EDIT:
We decided to remove the tests relying on the housing dataset in PR #2024. I am therefore reverting my changes on those tests and letting that PR remove all references to Legacy in the TestFramework DLL.

@artidoro artidoro added API Issues pertaining the friendly API test related to tests labels Jan 4, 2019
@artidoro artidoro self-assigned this Jan 4, 2019
*/
#pragma warning disable 612
[Fact(Skip = "Missing data set. See https://github.com/dotnet/machinelearning/issues/3")]
public async void PredictHousePriceModelTest()
Copy link
Member

@abgoswam abgoswam Jan 4, 2019

Choose a reason for hiding this comment

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

In my upcoming PR, I am deleting this test .

This test is being skipped so not not adding to code coverage. Also, I believe this test was testing the model load and prediction path.

In your PR, you are using a model generated using doing .Fit() but there is already an existing test for it HousePriceTrainAndPredictionTests.cs

@codemzs . Thoughts ?
#Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that these tests can be deleted, I did not see the HousePriceTrainAndPreictionTests.cs file. I am going to remove this test then

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed in person, I am reverting my changes and letting @abgoswam remove all tests that use the housing data set. See PR #2024 for more details.

let ml = MLContext(seed = new System.Nullable<int>(1), conc = 1)
let data = ml.Data.ReadFromTextFile<SentimentData>(testDataPath, hasHeader = true)

let pipeline = ml.Transforms.Text.FeaturizeText("SentimentText", "Features")
Copy link
Member

Choose a reason for hiding this comment

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

MinDocumentsInLeafts is no longer available in the new APIs?

Copy link
Contributor Author

@artidoro artidoro Jan 4, 2019

Choose a reason for hiding this comment

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

By default it is set to 10 (instead of 2 in the old test). I am not sure how to create an Action object in F#, and I believe this will not change the code coverage. We have tests that are specific to FastTree for binary classification that set the MinDocumentsInLeafs to something different.

@artidoro artidoro changed the title Remove Legacy dependency in ML.TestFramework and ML.FSharp.Tests Remove Legacy dependency in ML.FSharp.Tests Jan 4, 2019
Copy link
Member

@abgoswam abgoswam left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@codemzs codemzs left a comment

Choose a reason for hiding this comment

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

:shipit:

@codemzs codemzs merged commit 1319e2c into dotnet:master Jan 4, 2019
@artidoro artidoro deleted the legacytests branch January 5, 2019 00:01
@ghost ghost locked as resolved and limited conversation to collaborators Mar 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

API Issues pertaining the friendly API test related to tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants