Skip to content

Commit d72ee0e

Browse files
authored
Merge pull request #573 from dotnet/master
Update live with current master
2 parents 2a2ce20 + 3414e80 commit d72ee0e

File tree

10 files changed

+17
-26
lines changed

10 files changed

+17
-26
lines changed

machine-learning/tutorials/SentimentAnalysis/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
using System.Linq;
66
using Microsoft.ML;
77
using Microsoft.ML.Core.Data;
8-
using Microsoft.ML.Runtime.Api;
9-
using Microsoft.ML.Runtime.Data;
8+
using Microsoft.ML.Data;
109
using Microsoft.ML.Transforms.Text;
1110
// </Snippet1>
1211

@@ -35,7 +34,7 @@ static void Main(string[] args)
3534
// all the column names and their types. This is used to create the model, and train it.
3635
// Initialize our TextLoader
3736
// <Snippet4>
38-
_textLoader = mlContext.Data.TextReader(new TextLoader.Arguments()
37+
_textLoader = mlContext.Data.CreateTextReader(new TextLoader.Arguments()
3938
{
4039
Separator = "tab",
4140
HasHeader = true,
@@ -155,7 +154,7 @@ public static void Evaluate(MLContext mlContext, ITransformer model)
155154
private static void Predict(MLContext mlContext, ITransformer model)
156155
{
157156
// <Snippet17>
158-
var predictionFunction = model.MakePredictionFunction<SentimentData, SentimentPrediction>(mlContext);
157+
var predictionFunction = model.CreatePredictionEngine<SentimentData, SentimentPrediction>(mlContext);
159158
// </Snippet17>
160159

161160
// <Snippet18>

machine-learning/tutorials/SentimentAnalysis/SentimentAnalysis.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
66
</PropertyGroup>
77

88
<PropertyGroup>
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.ML" Version="0.8.0" />
17+
<PackageReference Include="Microsoft.ML" Version="0.9.0" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

machine-learning/tutorials/SentimentAnalysis/SentimentData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// <Snippet1>
2-
using Microsoft.ML.Runtime.Api;
2+
using Microsoft.ML.Data;
33
// </Snippet1>
44

55
namespace SentimentAnalysis

machine-learning/tutorials/TaxiFarePrediction/Program.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
using System.IO;
44
using Microsoft.ML;
55
using Microsoft.ML.Core.Data;
6-
using Microsoft.ML.Runtime.Api;
7-
using Microsoft.ML.Runtime.Data;
6+
using Microsoft.ML.Data;
87
using Microsoft.ML.Transforms;
98
using Microsoft.ML.Transforms.Categorical;
109
using Microsoft.ML.Transforms.Normalizers;
@@ -31,7 +30,7 @@ static void Main(string[] args)
3130
// </Snippet3>
3231

3332
// <Snippet4>
34-
_textLoader = mlContext.Data.TextReader(new TextLoader.Arguments()
33+
_textLoader = mlContext.Data.CreateTextReader(new TextLoader.Arguments()
3534
{
3635
Separator = ",",
3736
HasHeader = true,
@@ -139,7 +138,7 @@ private static void TestSinglePrediction(MLContext mlContext)
139138
//Prediction test
140139
// Create prediction function and make prediction.
141140
// <Snippet22>
142-
var predictionFunction = loadedModel.MakePredictionFunction<TaxiTrip, TaxiTripFarePrediction>(mlContext);
141+
var predictionFunction = loadedModel.CreatePredictionEngine<TaxiTrip, TaxiTripFarePrediction>(mlContext);
143142
// </Snippet22>
144143
//Sample:
145144
//vendor_id,rate_code,passenger_count,trip_time_in_secs,trip_distance,payment_type,fare_amount

machine-learning/tutorials/TaxiFarePrediction/TaxiFarePrediction.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp2.2</TargetFramework>
5+
<TargetFramework>netcoreapp2.1</TargetFramework>
66
</PropertyGroup>
77

88
<PropertyGroup>
99
<LangVersion>7.1</LangVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.ML" Version="0.8.0" />
13+
<PackageReference Include="Microsoft.ML" Version="0.9.0" />
1414
</ItemGroup>
1515

1616
<ItemGroup>

machine-learning/tutorials/TaxiFarePrediction/TaxiTrip.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// <Snippet1>
2-
using Microsoft.ML.Runtime.Api;
2+
using Microsoft.ML.Data;
33
// </Snippet1>
44

55
namespace TaxiFarePrediction

snippets/csharp/VS_Snippets_CLR/RegularExpressions.Examples.Email/cs/example4.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class RegexUtilities
77
{
88
public static bool IsValidEmail(string email)
99
{
10-
if (string.IsNullOrWhitespace(email))
10+
if (string.IsNullOrWhiteSpace(email))
1111
return false;
1212

1313
try

snippets/csharp/VS_Snippets_VBCSharp/csrefOperators/CS/csrefOperators.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
using System.Text;
66
using System.Diagnostics;
77

8-
9-
108
namespace ConsoleApplication1
119
{
1210

@@ -100,7 +98,6 @@ static void Main()
10098
Output:
10199
-1
102100
*/
103-
104101
//</snippet6>
105102

106103
// !
@@ -163,7 +160,6 @@ static void Main()
163160
0.6
164161
-1.2
165162
*/
166-
167163
//</snippet9>
168164

169165
// |=
@@ -185,7 +181,6 @@ static void Main()
185181
0x0000000e
186182
True
187183
*/
188-
189184
//</snippet10>
190185

191186
//<snippet11>
@@ -327,7 +322,6 @@ void M()
327322
System.Console.WriteLine("hello");
328323
//</snippet20>
329324
}
330-
331325
}
332326

333327
//<snippet21>
@@ -552,7 +546,6 @@ static void Main()
552546
Bitwise result: 1010
553547
Bitwise result: 11000111
554548
*/
555-
556549
//</snippet30>
557550

558551

@@ -1096,7 +1089,7 @@ static void Main()
10961089
int? x = null;
10971090

10981091
// Set y to the value of x if x is NOT null; otherwise,
1099-
// if x = null, set y to -1.
1092+
// if x == null, set y to -1.
11001093
int y = x ?? -1;
11011094

11021095
// Assign i to return value of the method if the method's result

windowsforms/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ If you're new to .NET Core, here are a few resources to help you understand the
77
* [Video: Modernizing Desktop Apps on Windows 10 with .NET Core 3.0 and much more](https://channel9.msdn.com/events/Build/2018/BRK3501?term=scott%20hunter&pubDate=year&lang-en=true)
88

99
## Quality disclaimer
10-
.NET Core 3 support for desktop development is not yet in preview. There are early daily builds available supporting WinForms and WPF. You will likely encounter missing tools, bugs, and unexpected behavior. We do not recommend using this SDK and tools for building applications for production scenarios. We do recommend using this SDK and tools to evaluate your how easy it will be to migrate your existing applications, or if you're just interested in trying out the latest upcoming Windows development technology.
10+
.NET Core 3 support for desktop development is in preview. There are early daily builds available supporting WinForms and WPF. You will likely encounter missing tools, bugs, and unexpected behavior. We do not recommend using this SDK and tools for building applications for production scenarios. We do recommend using this SDK and tools to evaluate your how easy it will be to migrate your existing applications, or if you're just interested in trying out the latest upcoming Windows development technology.
1111

1212
## Samples in this repo
1313
| Sample Name | Description |
@@ -21,7 +21,7 @@ If you're new to .NET Core, here are a few resources to help you understand the
2121

2222
### Prerequisites and getting the tools
2323

24-
Install Visual Studio 2017 Update 15.8 or higher from [https://visualstudio.microsoft.com/downloads/](https://visualstudio.microsoft.com/downloads/), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.1 development tools**.
24+
Install Visual Studio 2019 preview from [https://visualstudio.microsoft.com/vs/preview](https://visualstudio.microsoft.com/vs/preview), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.2 development tools**.
2525

2626
Install the latest [.NET Core 3.0 SDK daily build](https://aka.ms/netcore3sdk) available in the [dotnet/code-sdk repo](https://github.com/dotnet/core-sdk).
2727

wpf/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ See [WPF Samples](https://www.github.com/Microsoft/wpf-samples) repo for additio
1919

2020
### Prerequisites and getting the tools
2121

22-
Install Visual Studio 2017 Update 15.8 or higher from [https://visualstudio.microsoft.com/downloads/](https://visualstudio.microsoft.com/downloads/), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.1 development tools**.
22+
Install Visual Studio 2019 preview from [https://visualstudio.microsoft.com/vs/preview](https://visualstudio.microsoft.com/vs/preview), selecting the **.NET desktop development** workload with the options: **.NET Framwork 4.7.2 development tools** and **.NET Core 2.2 development tools**.
2323

2424
Install the latest [.NET Core 3.0 SDK daily build](https://aka.ms/netcore3sdk) available in the [dotnet/code-sdk repo](https://github.com/dotnet/core-sdk).
2525

0 commit comments

Comments
 (0)