Description
See this PR review comment: https://github.com/dotnet/machinelearning/pull/1951/files#r244808064.
machinelearning/src/Microsoft.ML.Data/DataLoadSave/TransformerChain.cs
Lines 255 to 263 in 13b3339
This is causing a real problem with the Custom Mapping Transformer work that I'm doing.
When a user tries loading a model that contains a Custom Mapping Transformer, but we can't find that extension/contract we throw an exception during ModelLoadContext.LoadModel
above saying Can't find extension 'foo'
.
However, this code here eats that exception, tries doing something else and then throws a terrible exception Repository doesn't contain entry DataLoaderModel\Model.key
, which makes absolutely no sense to the user.
We should change this code such that the original exception is thrown if we can't load the Pipeline
. Maybe we could start writing a flag into a "pipeline" model file to tell if it is supposed to be a Pipeline or not...? If we don't see that flag, then for sure the exception from ModelLoadContext.LoadModel
above should be thrown.
@TomFinley @Ivanidzo4ka - Thoughts?