Closed michaelgsharp closed 5 months ago
At least one of the code-coverage failures mentions torchsharp: https://dev.azure.com/dnceng-public/public/_build/results?buildId=528996&view=ms.vss-test-web.build-test-results-tab&runId=12474756&resultId=101332&paneView=debug
System.DllNotFoundException : Unable to load DLL 'LibTorchSharp' or one of its dependencies: The specified module could not be found. (0x8007007E)
Stack trace
at TorchSharp.PInvoke.NativeMethods.THSNN_custom_module(String name, ForwardFunctionC forward, IntPtr& pBoxedModule)
at TorchSharp.torch.nn.Module..ctor(String name)
at TorchSharp.torch.nn.HookableModule`2..ctor(String name)
at TorchSharp.torch.nn.Module`3..ctor(String name)
at Microsoft.ML.TorchSharp.NasBert.Models.BaseModel..ctor(NasBertOptions options) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\Models\BaseModel.cs:line 25
at Microsoft.ML.TorchSharp.NasBert.Models.NasBertModel..ctor(NasBertOptions options, Int32 padIndex, Int32 symbolsCount) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\Models\NasBertModel.cs:line 18
at Microsoft.ML.TorchSharp.NasBert.Models.ModelForPrediction..ctor(NasBertOptions options, Int32 padIndex, Int32 symbolsCount, Int32 numClasses) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\Models\ModelPrediction.cs:line 17
at Microsoft.ML.TorchSharp.NasBert.NasBertTrainer`2.NasBertTrainerBase.CreateModule(IChannel ch, IDataView input) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\NasBertTrainer.cs:line 210
at Microsoft.ML.TorchSharp.TorchSharpBaseTrainer`2.TrainerBase..ctor(TorchSharpBaseTrainer`2 parent, IChannel ch, IDataView input, String modelUrl) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\TorchSharpBaseTrainer.cs:line 155
at Microsoft.ML.TorchSharp.NasBert.NasBertTrainer`2.NasBertTrainerBase..ctor(TorchSharpBaseTrainer`2 parent, IChannel ch, IDataView input, String modelUrl) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\NasBertTrainer.cs:line 185
at Microsoft.ML.TorchSharp.NasBert.TextClassificationTrainer.Trainer..ctor(TorchSharpBaseTrainer`2 parent, IChannel ch, IDataView input) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\TextClassificationTrainer.cs:line 116
at Microsoft.ML.TorchSharp.NasBert.TextClassificationTrainer.CreateTrainer(TorchSharpBaseTrainer`2 parent, IChannel ch, IDataView input) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\NasBert\TextClassificationTrainer.cs:line 104
at Microsoft.ML.TorchSharp.TorchSharpBaseTrainer`2.Fit(IDataView input) in D:\a\_work\1\s\src\Microsoft.ML.TorchSharp\TorchSharpBaseTrainer.cs:line 107
at Microsoft.ML.Data.EstimatorChain`1.Fit(IDataView input) in D:\a\_work\1\s\src\Microsoft.ML.Data\DataLoadSave\EstimatorChain.cs:line 68
at Microsoft.ML.RunTests.TestDataPipeBase.TestEstimatorCore(IEstimator`1 estimator, IDataView validFitInput, IDataView validTransformInput, IDataView invalidInput, IDataView validForFitNotValidForTransformInput, Boolean shouldDispose) in D:\a\_work\1\s\test\Microsoft.ML.TestFramework\DataPipe\TestDataPipeBase.cs:line 80
at Microsoft.ML.TorchSharp.Tests.TextClassificationTests.TestSingleSentence3Classes() in D:\a\_work\1\s\test\Microsoft.ML.TorchSharp.Tests\TextClassificationTests.cs:line 239
Attention: 7 lines
in your changes are missing coverage. Please review.
Comparison is base (
d0d8569
) 68.80% compared to head (b8f4b4a
) 68.80%. Report is 1 commits behind head on main.
/backport to release/3.0
Started backporting to release/3.0: https://github.com/dotnet/machinelearning/actions/runs/7550850328
This PR updates the version of TorchSharp to the latest version to take advantage of some of the bug fixes it has that have been reported to us by some of our users.
It also fixes some test issues (makes the memory intensive ones actually run sequentially, they weren't doing it correctly before), and fixes the test namespace in the new test projects.