Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
16.98k stars 4.14k forks source link

Use dotnet 8.x in pre-commits to fix flaky failures #6083

Closed alex-mccarthy-unity closed 6 months ago

alex-mccarthy-unity commented 6 months ago

Proposed change(s)

The 8.x release should contain https://github.com/dotnet/runtime/pull/90342 which fixes https://github.com/dotnet/runtime/issues/80619.

I hope this will fix flaky failures like https://github.com/Unity-Technologies/ml-agents/actions/runs/8268945605/job/22623023348 of the form:

dotnet-format............................................................Failed
- hook id: dotnet-format
- exit code: 1

System.IO.IOException: The system cannot open the device or file specified. : 'NuGet-Migrations'
   at System.Threading.Mutex.CreateMutexCore(Boolean initiallyOwned, String name, Boolean& createdNew)
   at System.Threading.Mutex..ctor(Boolean initiallyOwned, String name)
   at NuGet.Common.Migrations.MigrationRunner.Run(String migrationsDirectory)
   at Microsoft.DotNet.Configurer.DotnetFirstTimeUseConfigurer.Configure()
   at Microsoft.DotNet.Cli.Program.ConfigureDotNetForFirstTimeUse(IFirstTimeUseNoticeSentinel firstTimeUseNoticeSentinel, IAspNetCertificateSentinel aspNetCertificateSentinel, IFileSentinel toolPathSentinel, Boolean isDotnetBeingInvokedFromNativeInstaller, DotnetFirstRunConfiguration dotnetFirstRunConfiguration, IEnvironmentProvider environmentProvider, Dictionary`2 performanceMeasurements)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

Types of change(s)

Checklist

Other comments

alex-mccarthy-unity commented 6 months ago

Unfortunately, we still see the same failure after this change :( https://github.com/Unity-Technologies/ml-agents/actions/runs/8278579680/job/22651228262

Namanl2001 commented 6 months ago

@alex-mccarthy-unity I'm facing the same issue with v8.0.2

did you find or know of any workaround for this? thanks!

alex-mccarthy-unity commented 6 months ago

@alex-mccarthy-unity I'm facing the same issue with v8.0.2

did you find or know of any workaround for this? thanks!

Unfortunately I don't know of any solutions :( I've found that retrying failed tasks has a good chance of the retry succeeding, but I know that that's an unsatisfying workaround.