Skip to content

Commit e33608d

Browse files
committed
Merge remote-tracking branch 'JakeRadMSFT/u/jakerad/column-container-cleanup' into u/jakerad/column-container-cleanup
2 parents 54bba84 + 5614df6 commit e33608d

File tree

50 files changed

+342
-174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+342
-174
lines changed

docs/samples/Microsoft.ML.AutoML.Samples/Microsoft.ML.AutoML.Samples.csproj

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

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net6.0</TargetFramework>
66
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
7-
<NoWarn>$(NoWarn);MSB3270</NoWarn>
7+
<NoWarn>$(NoWarn)</NoWarn>
8+
9+
<!-- Remove once we have resolved the TorchSharp issue. -->
10+
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
811
</PropertyGroup>
912

1013
<ItemGroup>

docs/samples/Microsoft.ML.Samples.GPU/Microsoft.ML.Samples.GPU.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<SignAssembly>false</SignAssembly>
77
<!--This ensures that we can never make the mistake of adding this as a friend assembly. Please don't remove.-->

docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlow/ImageClassification.cs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
using System.IO;
33
using System.Linq;
44
using System.Net;
5+
using System.Net.Http;
56
using System.Text;
7+
using System.Threading.Tasks;
68
using ICSharpCode.SharpZipLib.GZip;
79
using ICSharpCode.SharpZipLib.Tar;
810
using Microsoft.ML;
@@ -23,7 +25,9 @@ public static void Example()
2325
string modelLocation = "resnet_v2_101_299_frozen.pb";
2426
if (!File.Exists(modelLocation))
2527
{
26-
modelLocation = Download(@"https://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/resnet_v2_101.tgz", @"resnet_v2_101_299_frozen.tgz");
28+
var downloadTask = Download(@"https://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/resnet_v2_101.tgz", @"resnet_v2_101_299_frozen.tgz");
29+
downloadTask.Wait();
30+
modelLocation = downloadTask.Result;
2731
Unzip(Path.Join(Directory.GetCurrentDirectory(), modelLocation),
2832
Directory.GetCurrentDirectory());
2933

@@ -111,11 +115,18 @@ class OutputScores
111115
public float[] output { get; set; }
112116
}
113117

114-
private static string Download(string baseGitPath, string dataFile)
118+
private static async Task<string> Download(string baseGitPath, string dataFile)
115119
{
116-
using (WebClient client = new WebClient())
120+
if (File.Exists(dataFile))
121+
return dataFile;
122+
123+
using (HttpClient client = new HttpClient())
117124
{
118-
client.DownloadFile(new Uri($"{baseGitPath}"), dataFile);
125+
var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
126+
using (var fs = new FileStream(dataFile, FileMode.CreateNew))
127+
{
128+
await response.CopyToAsync(fs).ConfigureAwait(false);
129+
}
119130
}
120131

121132
return dataFile;

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ImageClassificationDefault.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IO.Compression;
66
using System.Linq;
77
using System.Net;
8+
using System.Net.Http;
89
using System.Threading;
910
using System.Threading.Tasks;
1011
using Microsoft.ML;
@@ -244,14 +245,14 @@ public static string DownloadImageSet(string imagesDownloadFolder)
244245
string fileName = "flower_photos_small_set.zip";
245246
string url = $"https://aka.ms/mlnet-resources/datasets/flower_photos_small_set.zip";
246247

247-
Download(url, imagesDownloadFolder, fileName);
248+
Download(url, imagesDownloadFolder, fileName).Wait();
248249
UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
249250

250251
return Path.GetFileNameWithoutExtension(fileName);
251252
}
252253

253254
// Download file to destination directory from input URL.
254-
public static bool Download(string url, string destDir, string destFileName)
255+
public static async Task<bool> Download(string url, string destDir, string destFileName)
255256
{
256257
if (destFileName == null)
257258
destFileName = url.Split(Path.DirectorySeparatorChar).Last();
@@ -266,14 +267,18 @@ public static bool Download(string url, string destDir, string destFileName)
266267
return false;
267268
}
268269

269-
var wc = new WebClient();
270270
Console.WriteLine($"Downloading {relativeFilePath}");
271-
var download = Task.Run(() => wc.DownloadFile(url, relativeFilePath));
272-
while (!download.IsCompleted)
271+
272+
using (HttpClient client = new HttpClient())
273273
{
274-
Thread.Sleep(1000);
275-
Console.Write(".");
274+
var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
275+
276+
using (var fs = new FileStream(relativeFilePath, FileMode.CreateNew))
277+
{
278+
await response.CopyToAsync(fs);
279+
}
276280
}
281+
277282
Console.WriteLine("");
278283
Console.WriteLine($"Downloaded {relativeFilePath}");
279284

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/LearningRateSchedulingCifarResnetTransferLearning.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IO.Compression;
66
using System.Linq;
77
using System.Net;
8+
using System.Net.Http;
89
using System.Threading;
910
using System.Threading.Tasks;
1011
using Microsoft.ML;
@@ -275,15 +276,15 @@ public static string DownloadImageSet(string imagesDownloadFolder)
275276
// https://github.com/YoongiKim/CIFAR-10-images
276277
string url = $"https://github.com/YoongiKim/CIFAR-10-images/archive/refs/heads/master.zip";
277278

278-
Download(url, imagesDownloadFolder, fileName);
279+
Download(url, imagesDownloadFolder, fileName).Wait();
279280
UnZip(Path.Combine(imagesDownloadFolder, fileName),
280281
imagesDownloadFolder);
281282

282283
return Path.GetFileNameWithoutExtension(fileName);
283284
}
284285

285286
// Download file to destination directory from input URL.
286-
public static bool Download(string url, string destDir, string destFileName)
287+
public static async Task<bool> Download(string url, string destDir, string destFileName)
287288
{
288289
if (destFileName == null)
289290
destFileName = url.Split(Path.DirectorySeparatorChar).Last();
@@ -298,14 +299,18 @@ public static bool Download(string url, string destDir, string destFileName)
298299
return false;
299300
}
300301

301-
var wc = new WebClient();
302302
Console.WriteLine($"Downloading {relativeFilePath}");
303-
var download = Task.Run(() => wc.DownloadFile(url, relativeFilePath));
304-
while (!download.IsCompleted)
303+
304+
using (HttpClient client = new HttpClient())
305305
{
306-
Thread.Sleep(1000);
307-
Console.Write(".");
306+
var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
307+
308+
using (var fs = new FileStream(relativeFilePath, FileMode.CreateNew))
309+
{
310+
await response.CopyToAsync(fs);
311+
}
308312
}
313+
309314
Console.WriteLine("");
310315
Console.WriteLine($"Downloaded {relativeFilePath}");
311316

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningEarlyStopping.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IO.Compression;
66
using System.Linq;
77
using System.Net;
8+
using System.Net.Http;
89
using System.Threading;
910
using System.Threading.Tasks;
1011
using Microsoft.ML;
@@ -232,14 +233,14 @@ public static string DownloadImageSet(string imagesDownloadFolder)
232233
string fileName = "flower_photos_small_set.zip";
233234
string url = $"https://aka.ms/mlnet-resources/datasets/flower_photos_small_set.zip";
234235

235-
Download(url, imagesDownloadFolder, fileName);
236+
Download(url, imagesDownloadFolder, fileName).Wait();
236237
UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
237238

238239
return Path.GetFileNameWithoutExtension(fileName);
239240
}
240241

241242
// Download file to destination directory from input URL.
242-
public static bool Download(string url, string destDir, string destFileName)
243+
public static async Task<bool> Download(string url, string destDir, string destFileName)
243244
{
244245
if (destFileName == null)
245246
destFileName = url.Split(Path.DirectorySeparatorChar).Last();
@@ -254,14 +255,18 @@ public static bool Download(string url, string destDir, string destFileName)
254255
return false;
255256
}
256257

257-
var wc = new WebClient();
258258
Console.WriteLine($"Downloading {relativeFilePath}");
259-
var download = Task.Run(() => wc.DownloadFile(url, relativeFilePath));
260-
while (!download.IsCompleted)
259+
260+
using (HttpClient client = new HttpClient())
261261
{
262-
Thread.Sleep(1000);
263-
Console.Write(".");
262+
var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
263+
264+
using (var fs = new FileStream(relativeFilePath, FileMode.CreateNew))
265+
{
266+
await response.CopyToAsync(fs);
267+
}
264268
}
269+
265270
Console.WriteLine("");
266271
Console.WriteLine($"Downloaded {relativeFilePath}");
267272

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/MulticlassClassification/ImageClassification/ResnetV2101TransferLearningTrainTestSplit.cs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.IO.Compression;
66
using System.Linq;
77
using System.Net;
8+
using System.Net.Http;
89
using System.Threading;
910
using System.Threading.Tasks;
1011
using Microsoft.ML;
@@ -253,14 +254,14 @@ public static string DownloadImageSet(string imagesDownloadFolder)
253254
string fileName = "flower_photos_small_set.zip";
254255
string url = $"https://aka.ms/mlnet-resources/datasets/flower_photos_small_set.zip";
255256

256-
Download(url, imagesDownloadFolder, fileName);
257+
Download(url, imagesDownloadFolder, fileName).Wait();
257258
UnZip(Path.Combine(imagesDownloadFolder, fileName), imagesDownloadFolder);
258259

259260
return Path.GetFileNameWithoutExtension(fileName);
260261
}
261262

262263
// Download file to destination directory from input URL.
263-
public static bool Download(string url, string destDir, string destFileName)
264+
public static async Task<bool> Download(string url, string destDir, string destFileName)
264265
{
265266
if (destFileName == null)
266267
destFileName = url.Split(Path.DirectorySeparatorChar).Last();
@@ -275,14 +276,18 @@ public static bool Download(string url, string destDir, string destFileName)
275276
return false;
276277
}
277278

278-
var wc = new WebClient();
279279
Console.WriteLine($"Downloading {relativeFilePath}");
280-
var download = Task.Run(() => wc.DownloadFile(url, relativeFilePath));
281-
while (!download.IsCompleted)
280+
281+
using (HttpClient client = new HttpClient())
282282
{
283-
Thread.Sleep(1000);
284-
Console.Write(".");
283+
var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
284+
285+
using (var fs = new FileStream(relativeFilePath, FileMode.CreateNew))
286+
{
287+
await response.CopyToAsync(fs);
288+
}
285289
}
290+
286291
Console.WriteLine("");
287292
Console.WriteLine($"Downloaded {relativeFilePath}");
288293

docs/samples/Microsoft.ML.Samples/Microsoft.ML.Samples.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55
<OutputType>Exe</OutputType>
66
<SignAssembly>false</SignAssembly>
77
<!--This ensures that we can never make the mistake of adding this as a friend assembly. Please don't remove.-->

eng/Version.Details.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77
</Dependency>
88
</ProductDependencies>
99
<ToolsetDependencies>
10-
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.23073.6">
10+
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="7.0.0-beta.23228.7">
1111
<Uri>https://github.com/dotnet/arcade</Uri>
12-
<Sha>5f8519337c864af63b8692754ca0fa971bfc55d4</Sha>
12+
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
1313
</Dependency>
14-
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="7.0.0-beta.23073.6">
14+
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="7.0.0-beta.23228.7">
1515
<Uri>https://github.com/dotnet/arcade</Uri>
16-
<Sha>5f8519337c864af63b8692754ca0fa971bfc55d4</Sha>
16+
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
1717
</Dependency>
18-
<Dependency Name="Microsoft.DotNet.SignTool" Version="7.0.0-beta.23073.6">
18+
<Dependency Name="Microsoft.DotNet.SignTool" Version="7.0.0-beta.23228.7">
1919
<Uri>https://github.com/dotnet/arcade</Uri>
20-
<Sha>5f8519337c864af63b8692754ca0fa971bfc55d4</Sha>
20+
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
2121
</Dependency>
22-
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="7.0.0-beta.23073.6">
22+
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="7.0.0-beta.23228.7">
2323
<Uri>https://github.com/dotnet/arcade</Uri>
24-
<Sha>5f8519337c864af63b8692754ca0fa971bfc55d4</Sha>
24+
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
2525
</Dependency>
26-
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="7.0.0-beta.23073.6">
26+
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="7.0.0-beta.23228.7">
2727
<Uri>https://github.com/dotnet/arcade</Uri>
28-
<Sha>5f8519337c864af63b8692754ca0fa971bfc55d4</Sha>
28+
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
2929
</Dependency>
3030
<Dependency Name="Microsoft.DotNet.Maestro.Client" Version="1.1.0-beta.20074.1">
3131
<Uri>https://github.com/dotnet/arcade-services</Uri>
@@ -39,9 +39,9 @@
3939
<Uri>https://github.com/dotnet/xharness</Uri>
4040
<Sha>89cb4b1d368e0f15b4df8e02a176dd1f1c33958b</Sha>
4141
</Dependency>
42-
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="7.0.0-beta.23073.6">
42+
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="7.0.0-beta.23228.7">
4343
<Uri>https://github.com/dotnet/arcade</Uri>
44-
<Sha>5f8519337c864af63b8692754ca0fa971bfc55d4</Sha>
44+
<Sha>df8799988af6503cbcd9544713d30732328c8c57</Sha>
4545
</Dependency>
4646
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="3.8.0-3.20460.2">
4747
<Uri>https://github.com/dotnet/roslyn</Uri>

eng/Versions.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@
7676
<ApprovalTestsVersion>5.4.7</ApprovalTestsVersion>
7777
<BenchmarkDotNetVersion>0.12.0</BenchmarkDotNetVersion>
7878
<DotNetRuntime60Version>6.0.9</DotNetRuntime60Version>
79+
<DotNetRuntime80Version>8.0.0-preview.3.23174.8</DotNetRuntime80Version>
7980
<FluentAssertionVersion>5.10.2</FluentAssertionVersion>
8081
<MicrosoftCodeAnalysisTestingVersion>1.1.2-beta1.22512.1</MicrosoftCodeAnalysisTestingVersion>
81-
<MicrosoftDotNetXUnitExtensionsVersion>7.0.0-beta.23073.6</MicrosoftDotNetXUnitExtensionsVersion>
82+
<MicrosoftDotNetXUnitExtensionsVersion>7.0.0-beta.23228.7</MicrosoftDotNetXUnitExtensionsVersion>
8283
<MicrosoftExtensionsDependencyModelVersion>2.1.0</MicrosoftExtensionsDependencyModelVersion>
8384
<MicrosoftExtensionsTestVersion>3.0.1</MicrosoftExtensionsTestVersion>
8485
<MicrosoftMLOnnxTestModelsVersion>0.0.6-test</MicrosoftMLOnnxTestModelsVersion>

0 commit comments

Comments
 (0)