Skip to content

Debugging Test PR #4908

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 6 additions & 65 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,18 @@ resources:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-mlnet-207e097-20190312152303

jobs:
- template: /build/ci/job-template.yml
parameters:
name: Centos_x64_NetCoreApp31
buildScript: ./build.sh
container: CentosContainer
customMatrixes:
Debug_Build:
_configuration: Debug-netcoreapp3_1
_config_short: DI
_includeBenchmarkData: false
_targetFramework: netcoreapp3.1
Release_Build:
_configuration: Release-netcoreapp3_1
_config_short: RI
_includeBenchmarkData: true
_targetFramework: netcoreapp3.1
innerLoop: true
pool:
name: Hosted Ubuntu 1604

- template: /build/ci/job-template.yml
parameters:
name: Ubuntu_x64_NetCoreApp21
buildScript: ./build.sh
container: UbuntuContainer
innerLoop: true
pool:
name: Hosted Ubuntu 1604

- template: /build/ci/job-template.yml
parameters:
name: MacOS_x64_NetCoreApp21
buildScript: ./build.sh
innerLoop: true
pool:
name: Hosted macOS

- template: /build/ci/job-template.yml
parameters:
name: Windows_x64_NetCoreApp31
buildScript: build.cmd
customMatrixes:
Debug_Build:
_configuration: Debug-netcoreapp3_1
_config_short: DI
_includeBenchmarkData: false
_targetFramework: netcoreapp3.1
Release_Build:
_configuration: Release-netcoreapp3_1
_config_short: RI
_includeBenchmarkData: true
_targetFramework: netcoreapp3.1
innerLoop: true
innerLoop: false
runSpecific: false
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v3.0"
pool:
name: Hosted VS2017
Expand All @@ -72,37 +31,19 @@ jobs:
parameters:
name: Windows_x64_NetCoreApp21
buildScript: build.cmd
innerLoop: true
innerLoop: false
runSpecific: false
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v2.1"
pool:
name: Hosted VS2017

- template: /build/ci/job-template.yml
parameters:
name: Windows_x64_NetFx461
buildScript: build.cmd
customMatrixes:
Debug_Build:
_configuration: Debug-netfx
_config_short: DFX
_includeBenchmarkData: false
_targetFramework: win-x64
Release_Build:
_configuration: Release-netfx
_config_short: RFX
_includeBenchmarkData: false
_targetFramework: win-x64
innerLoop: true
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v4.0"
pool:
name: Hosted VS2017

- template: /build/ci/job-template.yml
parameters:
name: Windows_x86_NetCoreApp21
architecture: x86
buildScript: build.cmd
innerLoop: true
innerLoop: false
runSpecific: false
vsTestConfiguration: "/Framework:.NETCoreApp,Version=v2.1"
pool:
name: Hosted VS2017
12 changes: 12 additions & 0 deletions src/Microsoft.ML.Core/Environment/HostEnvironmentBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,18 @@ public HostBase(HostEnvironmentBase<TEnv> source, string shortName, string paren
Depth = source.Depth + 1;
}

/// <summary>
/// This method registers and returns the host for the calling component. The generated host is also
/// added to <see cref="_children"/> and encapsulated by <see cref="WeakReference"/>. It becomes
/// necessary to remove these hosts when they are reclaimed by the Garbage Collector.
/// </summary>
public new IHost Register(string name, int? seed = null, bool? verbose = null)
{
Contracts.CheckNonEmpty(name, nameof(name));
IHost host;
lock (_cancelLock)
{
_children.RemoveAll(r => r.TryGetTarget(out IHost _) == false);
Random rand = (seed.HasValue) ? RandomUtils.Create(seed.Value) : RandomUtils.Create(_rand);
host = RegisterCore(this, name, Master?.FullName, rand, verbose ?? Verbose);
if (!IsCanceled)
Expand Down Expand Up @@ -385,12 +391,18 @@ protected HostEnvironmentBase(HostEnvironmentBase<TEnv> source, Random rand, boo
_children = new List<WeakReference<IHost>>();
}

/// <summary>
/// This method registers and returns the host for the calling component. The generated host is also
/// added to <see cref="_children"/> and encapsulated by <see cref="WeakReference"/>. It becomes
/// necessary to remove these hosts when they are reclaimed by the Garbage Collector.
/// </summary>
public IHost Register(string name, int? seed = null, bool? verbose = null)
{
Contracts.CheckNonEmpty(name, nameof(name));
IHost host;
lock (_cancelLock)
{
_children.RemoveAll(r => r.TryGetTarget(out IHost _) == false);
Random rand = (seed.HasValue) ? RandomUtils.Create(seed.Value) : RandomUtils.Create(_rand);
host = RegisterCore(this, name, Master?.FullName, rand, verbose ?? Verbose);
_children.Add(new WeakReference<IHost>(host));
Expand Down