Skip to content

replace e.g. with for example #1016

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

Merged
merged 6 commits into from
Oct 9, 2018
Merged

replace e.g. with for example #1016

merged 6 commits into from
Oct 9, 2018

Conversation

mairaw
Copy link
Contributor

@mairaw mairaw commented Sep 25, 2018

I've noticed in some of the API docs for ML.NET that I was browsing that there is a heavy use of e.g. which is against our style guide rules (https://docs.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/e/eg). So replaced it across the board on the repo.

Once this is merged, I can create a separate PR for i.e. which also shouldn't be used.

@@ -337,13 +337,13 @@ aside (which we can hardly help), we expect the models to be the same.
When you create a loader you have the option of specifying not only *one* data
input, but any number of data input files, including zero. But there's also a
more general principle at work here with zero files: when deserializing a data
loader from a data model with an `IMultiStreamSource` with `Count == 0` (e.g.,
loader from a data model with an `IMultiStreamSource` with `Count == 0` (for example,
Copy link
Contributor

@TomFinley TomFinley Sep 25, 2018

Choose a reason for hiding this comment

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

It's a little unfortunate that the linebreaking got all screwed up due to the longer lines, but I guess maybe we can opportunistically fix it later? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TomFinley this is usually a personal choice. Some people choose to cut the text that way, no?

@TomFinley
Copy link
Contributor

TomFinley commented Sep 25, 2018

Are we going to have a separate PR for i.e.? ;) Edit: I was joking but I see from the PR description but this was actually the plan.

@@ -79,7 +79,7 @@ public static ColumnInfo CreateFromIndex(ISchema schema, int index)
/// individually configured). Also, by being a one-to-many mapping, it is a way for learners that can consume
/// multiple features columns to consume that information.
///
/// This class has convenience fields for several common column roles (se.g., <see cref="Feature"/>, <see
/// This class has convenience fields for several common column roles (sfor example, <see cref="Feature"/>, <see
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Spelling (propagated from previous) #Closed

@@ -22,7 +22,7 @@ Or from within Visual Studio's NuGet package manager.

This initial release contains core ML.NET components for enabling machine learning pipelines:

* ML Data Structures (e.g. `IDataView`, `LearningPipeline`)
* ML Data Structures (for example, `IDataView`, `LearningPipeline`)
Copy link
Contributor

@TomFinley TomFinley Sep 25, 2018

Choose a reason for hiding this comment

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

for example [](start = 22, length = 11)

Live documentation seems fine, I guess. This however I'm not sure about. These are release notes that have already been released. They're already out. #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want me to revert in those cases @TomFinley?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think.


In reply to: 222494637 [](ancestors = 222494637)

/// (c) Use FailedPrecondition if the client should not retry until
/// the system state has been explicitly fixed. E.g., if an "rmdir"
/// the system state has been explicitly fixed. For example, if an "rmdir"
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Minor: extra space after period. #Closed

@@ -25,7 +25,7 @@ public partial class ApiScenariosTests
/// *) The tree ensemble learners, I should be able to inspect the trees.
/// *) The LDA transform, I should be able to inspect the topics.
/// I view it as essential from a usability perspective that this be discoverable to someone without
/// having to read documentation.E.g.: if I have var lda = new LdaTransform().Fit(data)(I don't insist on that
/// having to read documentation.For example,: if I have var lda = new LdaTransform().Fit(data)(I don't insist on that
Copy link
Contributor

@TomFinley TomFinley Sep 25, 2018

Choose a reason for hiding this comment

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

.F [](start = 41, length = 2)

Spacing please... and a spare comma. #Closed

@@ -13,7 +13,7 @@ public partial class ApiScenariosTests
{
/// <summary>
/// Visibility: It should, possibly through the debugger, be not such a pain to actually
/// see what is happening to your data when you apply this or that transform. E.g.: if I
/// see what is happening to your data when you apply this or that transform. For example,: if I
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Extra comma #Closed

@@ -33,7 +33,7 @@ private TOut GetValue<TOut>(Dictionary<string, object> keyValues, string key)
/// *) The tree ensemble learners, I should be able to inspect the trees.
/// *) The LDA transform, I should be able to inspect the topics.
/// I view it as essential from a usability perspective that this be discoverable to someone without
/// having to read documentation.E.g.: if I have var lda = new LdaTransform().Fit(data)(I don't insist on that
/// having to read documentation.For example,: if I have var lda = new LdaTransform().Fit(data)(I don't insist on that
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Missing space & extra comma #Closed

@@ -13,7 +13,7 @@ public partial class ApiScenariosTests
{
/// <summary>
/// Visibility: It should, possibly through the debugger, be not such a pain to actually
/// see what is happening to your data when you apply this or that transform. E.g.: if I
/// see what is happening to your data when you apply this or that transform. For example,: if I
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

extra comma #Closed

@@ -1403,7 +1403,7 @@ private sealed class ImplVec<T> : ColumnCache<VBuffer<T>>
// For a given row [r], elements at [r] and [r+1] specify the inclusive
// and exclusive range of values for the two big arrays. In the case
// of indices, if that range is empty, then the corresponding stored
// vector is dense. E.g.: row 5 would have its vector's values stored
// vector is dense. For example,: row 5 would have its vector's values stored
Copy link
Contributor

@TomFinley TomFinley Sep 25, 2018

Choose a reason for hiding this comment

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

e,: [](start = 46, length = 3)

Comma #Closed

@@ -1403,7 +1403,7 @@ private sealed class ImplVec<T> : ColumnCache<VBuffer<T>>
// For a given row [r], elements at [r] and [r+1] specify the inclusive
// and exclusive range of values for the two big arrays. In the case
// of indices, if that range is empty, then the corresponding stored
// vector is dense. E.g.: row 5 would have its vector's values stored
// vector is dense. For example,: row 5 would have its vector's values stored
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

extra comma / colon #Closed

@@ -513,7 +513,7 @@ public sealed class SuggestedSweepsParser
/// Generic parameter parser. Currently hand-hacked to auto-detect type.
///
/// Generic form: Name:Values
/// e.g.: lr:0.05-0.4
/// for example,: lr:0.05-0.4
Copy link
Contributor

@TomFinley TomFinley Sep 25, 2018

Choose a reason for hiding this comment

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

e,: [](start = 22, length = 3)

Comma #Closed

@@ -513,7 +513,7 @@ public sealed class SuggestedSweepsParser
/// Generic parameter parser. Currently hand-hacked to auto-detect type.
///
/// Generic form: Name:Values
/// e.g.: lr:0.05-0.4
/// for example,: lr:0.05-0.4
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Extra comma #Closed

@@ -25,7 +25,7 @@ public partial class ApiScenariosTests
/// *) The tree ensemble learners, I should be able to inspect the trees.
/// *) The LDA transform, I should be able to inspect the topics.
/// I view it as essential from a usability perspective that this be discoverable to someone without
/// having to read documentation.E.g.: if I have var lda = new LdaTransform().Fit(data)(I don't insist on that
/// having to read documentation.For example,: if I have var lda = new LdaTransform().Fit(data)(I don't insist on that
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Extra comma / colon #Closed

@@ -1776,7 +1776,7 @@ internal enum TFCode : uint
Aborted = 10,

/// <summary>
/// Operation tried to iterate past the valid input range. E.g., seeking or
/// Operation tried to iterate past the valid input range. For example, seeking or
Copy link
Contributor

@justinormont justinormont Sep 25, 2018

Choose a reason for hiding this comment

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

Extra space after period #Closed

@mairaw
Copy link
Contributor Author

mairaw commented Oct 3, 2018

Feedback and merge conflicts resolved. I know it's a funny PR @TomFinley but given this are making into the product and documentation, I think we should follow the style guide. Decided to separate the i.e. just to not overwhelm you with a giant PR.

@@ -14,7 +14,7 @@ namespace Microsoft.ML.StaticPipe.Runtime
/// <summary>
/// A schema shape with names corresponding to a type parameter in one of the typed variants
/// of the data pipeline structures. Instances of this class tend to be bundled with the statically
/// typed variants of the dynamic structures (e.g., <see cref="DataView{TShape}"/> and so forth),
/// typed variants of the dynamic structures (for example, <see cref="DataView{TTupleShape}"/> and so forth),
Copy link
Contributor

@justinormont justinormont Oct 4, 2018

Choose a reason for hiding this comment

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

Was renaming TShape to TTupleShape intentional? #Closed

Copy link
Contributor Author

@mairaw mairaw Oct 4, 2018

Choose a reason for hiding this comment

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

Nope. I probably did a wrong analysis when resolving conflicts. The only changes should be spaces and e.g. -> for example #Closed

Copy link
Contributor

@justinormont justinormont left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Zruty0 Zruty0 left a comment

Choose a reason for hiding this comment

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

:shipit:

@Zruty0
Copy link
Contributor

Zruty0 commented Oct 5, 2018

@mairaw thanks for doing the work!
Could you please undo the changes for old release notes, then it will be good to go?

@mairaw
Copy link
Contributor Author

mairaw commented Oct 9, 2018

Thanks everyone for their feedback. I think this should be ready then!

@justinormont
Copy link
Contributor

I'm going to close/re-open to restart the CI tests.

Error looks to be:

2018-10-09T18:08:09.5762190Z Error Message:
2018-10-09T18:08:09.5762970Z  System.InvalidOperationException : MTA thread failed
2018-10-09T18:08:09.5764350Z ---- Assert.InRange() Failure
2018-10-09T18:08:09.5765820Z Range:  (-0.0001 - 0.0001)
2018-10-09T18:08:09.5768440Z Actual: -6
2018-10-09T18:08:09.5768600Z Stack Trace:
2018-10-09T18:08:09.5768920Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.RunMTAThread(ThreadStart fn) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 807
2018-10-09T18:08:09.5769140Z    at Microsoft.ML.Runtime.RunTests.TestPredictors.MulticlassTreeFeaturizedLRTest() in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs:line 201
2018-10-09T18:08:09.5769780Z ----- Inner Stack Trace -----
2018-10-09T18:08:09.5769960Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.MatchNumberWithTolerance(MatchCollection firstCollection, MatchCollection secondCollection, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 616
2018-10-09T18:08:09.5770150Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.GetNumbersFromFile(String& firstString, String& secondString, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 601
2018-10-09T18:08:09.5770310Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.CheckEqualityFromPathsCore(String relPath, String basePath, String outPath, Int32 skip, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 581
2018-10-09T18:08:09.5770480Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.CheckEqualityCore(String dir, String name, String nameBase, Boolean normalize, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 387
2018-10-09T18:08:09.5771030Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.CheckEqualityNormalized(String dir, String name, String nameBase, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 357
2018-10-09T18:08:09.5771370Z    at Microsoft.ML.Runtime.RunTests.TestCommandBase.OutputPath.CheckEqualityNormalized(Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/TestCommandBase.cs:line 76
2018-10-09T18:08:09.5771550Z    at Microsoft.ML.Runtime.RunTests.BaseTestPredictors.Run(RunContext ctx, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs:line 167
2018-10-09T18:08:09.5771760Z    at Microsoft.ML.Runtime.RunTests.BaseTestPredictors.Run_TrainTest(PredictorAndArgs predictor, TestDataset dataset, String[] extraSettings, String extraTag, Boolean expectFailure, Boolean summary, Boolean saveAsIni, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs:line 389
2018-10-09T18:08:09.5771970Z    at Microsoft.ML.Runtime.RunTests.BaseTestPredictors.RunOneAllTests(PredictorAndArgs predictor, TestDataset dataset, String[] extraSettings, String extraTag, Boolean summary, Int32 digitsOfPrecision) in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestPredictorsMaml.cs:line 357
2018-10-09T18:08:09.5772150Z    at Microsoft.ML.Runtime.RunTests.TestPredictors.<MulticlassTreeFeaturizedLRTest>b__15_0() in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.Predictor.Tests/TestPredictors.cs:line 204
2018-10-09T18:08:09.5772380Z    at Microsoft.ML.Runtime.RunTests.BaseTestBaseline.<>c__DisplayClass107_0.<RunMTAThread>b__0() in /Users/buildagent/agent/agent/_work/1/s/test/Microsoft.ML.TestFramework/BaseTestBaseline.cs:line 792
2018-10-09T18:08:09.5772630Z Standard Output Messages:
2018-10-09T18:08:09.5773520Z  Running 'MulticlassLogisticRegression' on 'iris-tree-featurized'
2018-10-09T18:08:09.5775550Z    Running as: TrainTest tr=MulticlassLogisticRegression{l1=0.001 l2=0.1 ot=1e-3 nt=1} data=/Users/buildagent/agent/agent/_work/1/s/test/data/iris.txt seed=1 test=/Users/buildagent/agent/agent/_work/1/s/test/data/iris.txt loader=Text{col=Label:U4[0-2]:0 col=Features:1-*} xf=TreeFeat{lps=0 trainer=ftr{iter=3}} xf=copy{col=Features:Leaves} out={/Users/buildagent/agent/agent/_work/1/s/bin/AnyCPU.Debug/Microsoft.ML.Predictor.Tests/netcoreapp2.1/TestOutput/MulticlassLogisticRegression/MulticlassLogisticRegression-TrainTest-iris-tree-featurized-model.zip} dout={/Users/buildagent/agent/agent/_work/1/s/bin/AnyCPU.Debug/Microsoft.ML.Predictor.Tests/netcoreapp2.1/TestOutput/MulticlassLogisticRegression/MulticlassLogisticRegression-TrainTest-iris-tree-featurized.txt} norm=no
2018-10-09T18:08:09.5776830Z  Output matches baseline: 'MulticlassLogisticRegression/MulticlassLogisticRegression-TrainTest-iris-tree-featurized-out.txt'
2018-10-09T18:08:09.5777830Z  Output matches baseline: 'MulticlassLogisticRegression/MulticlassLogisticRegression-TrainTest-iris-tree-featurized.txt'
2018-10-09T18:08:09.5778570Z  Suffix of length 27 compared against sequence of length 41
2018-10-09T18:08:09.5779650Z  Running 'MulticlassLogisticRegression' on 'iris-tree-featurized'
2018-10-09T18:08:09.5781170Z    Running as: CV tr=MulticlassLogisticRegression{l1=0.001 l2=0.1 ot=1e-3 nt=1} data=/Users/buildagent/agent/agent/_work/1/s/test/data/iris.txt seed=1 loader=Text{col=Label:U4[0-2]:0 col=Features:1-*} xf=TreeFeat{lps=0 trainer=ftr{iter=3}} xf=copy{col=Features:Leaves} dout={/Users/buildagent/agent/agent/_work/1/s/bin/AnyCPU.Debug/Microsoft.ML.Predictor.Tests/netcoreapp2.1/TestOutput/MulticlassLogisticRegression/MulticlassLogisticRegression-CV-iris-tree-featurized.txt} norm=no threads-
2018-10-09T18:08:09.5782080Z  Output matches baseline: 'MulticlassLogisticRegression/MulticlassLogisticRegression-CV-iris-tree-featurized-out.txt'
2018-10-09T18:08:09.5783300Z  Output matches baseline: 'MulticlassLogisticRegression/MulticlassLogisticRegression-CV-iris-tree-featurized.txt'
2018-10-09T18:08:09.5784180Z  Running 'MulticlassLogisticRegression' on 'iris-tree-featurized-permuted'
2018-10-09T18:08:09.5786440Z    Running as: TrainTest tr=MulticlassLogisticRegression{l1=0.001 l2=0.1 ot=1e-3 nt=1} data=/Users/buildagent/agent/agent/_work/1/s/test/data/iris.txt seed=1 test=/Users/buildagent/agent/agent/_work/1/s/test/data/iris.txt loader=Text{col=Label:U4[0-2]:0 col=Features:1-*} xf=TreeFeat{lps=2 trainer=ftr{iter=3}} xf=copy{col=Features:Leaves} out={/Users/buildagent/agent/agent/_work/1/s/bin/AnyCPU.Debug/Microsoft.ML.Predictor.Tests/netcoreapp2.1/TestOutput/MulticlassLogisticRegression/MulticlassLogisticRegression-TrainTest-iris-tree-featurized-permuted-model.zip} dout={/Users/buildagent/agent/agent/_work/1/s/bin/AnyCPU.Debug/Microsoft.ML.Predictor.Tests/netcoreapp2.1/TestOutput/MulticlassLogisticRegression/MulticlassLogisticRegression-TrainTest-iris-tree-featurized-permuted.txt} norm=no
2018-10-09T18:08:09.5787570Z  *** Failure: The test threw an exception - Xunit.Sdk.InRangeException: Assert.InRange() Failure

@justinormont justinormont reopened this Oct 9, 2018
@justinormont justinormont merged commit 65c3c7c into dotnet:master Oct 9, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Mar 28, 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.

4 participants