Skip to content
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

Fix #7203 #7207

Merged
merged 1 commit into from
Aug 2, 2024
Merged
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
8 changes: 4 additions & 4 deletions test/Microsoft.ML.AutoML.Tests/AutoMLExperimentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,7 @@ public async Task AutoMLExperiment_return_current_best_trial_when_ct_is_canceled
res.Metric.Should().BeGreaterThan(0);
}

//https://github.com/dotnet/machinelearning/issues/7203
[X86X64Fact("Fails on Linux Arm machines")]
[Fact]
public async Task AutoMLExperiment_finish_training_when_time_is_up_Async()
{
var context = new MLContext(1);
Expand All @@ -167,12 +166,12 @@ public async Task AutoMLExperiment_finish_training_when_time_is_up_Async()
{
var channel = serviceProvider.GetService<IChannel>();
var settings = serviceProvider.GetService<AutoMLExperiment.AutoMLExperimentSettings>();
return new DummyTrialRunner(settings, 0, channel);
return new DummyTrialRunner(settings, 1, channel);
})
.SetTuner<RandomSearchTuner>();

var cts = new CancellationTokenSource();
cts.CancelAfter(10 * 1000);
cts.CancelAfter(100 * 1000);

var res = await experiment.RunAsync(cts.Token);
res.Metric.Should().BeGreaterThan(0);
Expand Down Expand Up @@ -446,6 +445,7 @@ public void Dispose()
public async Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
{
_logger.Info("Update Running Trial");
ct.ThrowIfCancellationRequested();
await Task.Delay(_finishAfterNSeconds * 1000, ct);
ct.ThrowIfCancellationRequested();
_logger.Info("Update Completed Trial");
Expand Down
Loading