Repository navigation
undoing test changes #974
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
undoing test changes #974
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using Microsoft.ML.Runtime.Data; | ||
| using Microsoft.ML.Runtime.Internal.Calibration; | ||
| using Microsoft.ML.Runtime.Learners; | ||
| using Microsoft.ML.Runtime.RunTests; | ||
| using System.Linq; | ||
| using Xunit; | ||
|
|
||
| namespace Microsoft.ML.Tests.Scenarios.Api | ||
| { | ||
| public partial class ApiScenariosTests | ||
| { | ||
| /// <summary> | ||
| /// Meta-components: Meta-components (e.g., components that themselves instantiate components) should not be booby-trapped. | ||
| /// When specifying what trainer OVA should use, a user will be able to specify any binary classifier. | ||
| /// If they specify a regression or multi-class classifier ideally that should be a compile error. | ||
| /// </summary> | ||
| [Fact] | ||
| public void New_Metacomponents() | ||
| { | ||
| using (var env = new LocalEnvironment()) | ||
| { | ||
| var data = new TextLoader(env, MakeIrisTextLoaderArgs()) | ||
| .Read(new MultiFileSource(GetDataPath(TestDatasets.irisData.trainFilename))); | ||
|
|
||
| var sdcaTrainer = new LinearClassificationTrainer(env, new LinearClassificationTrainer.Arguments { MaxIterations = 100, Shuffle = true, NumThreads = 1 }, "Features", "Label"); | ||
| var pipeline = new ConcatEstimator(env, "Features", "SepalLength", "SepalWidth", "PetalLength", "PetalWidth") | ||
| .Append(new TermEstimator(env, "Label"), TransformerScope.TrainTest) | ||
| .Append(new Ova(env, sdcaTrainer)) | ||
| .Append(new KeyToValueEstimator(env, "PredictedLabel")); | ||
|
|
||
| var model = pipeline.Fit(data); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to do something with the model to ensure it was made correctly?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was thinking the same about all the tests we added recently. I'll so a sweep to all of them.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The purpose of these 'tests' is generally to demonstrate how we perform the scenario listed in the summary. I think it's enough that the code compiles and runs without throwing. In reply to: 219552007 [](ancestors = 219552007)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My thoughts: Do those separate tests do the exact same thing as these? If yes, then these tests are redundant. If no, then these tests should be validating the scenario works as expected because the separate tests are doing something different.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will compact them. Thanks @eerhardt. |
||
| } | ||
| } | ||
| } | ||
| } | ||
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.
@Zruty0 instead?