Closed rauhs closed 6 years ago
Just to mention that I noticed this as well when using "master"
The workaround for this problem is to force the eager load of ML.NET assemblies before the point in the script where entry points are collected and used, e.g. by this:
let _load =
[ typeof<Microsoft.ML.Runtime.Transforms.TextAnalytics>
typeof<Microsoft.ML.Runtime.FastTree.FastTree> ]
The ML.NET Framework scrapes loaded assemblies for entry points. F# Interactive doesn't eagerly load assemblies referenced with #r
, it lets the .NET runtime do the loading. If nothing prior to the creation of the ML.NET environment and the first internal call to CacheLoadedAssemblies
has required the loading of the various features containing the ML.NET assemblies being used then they will not be recorded in the ML.NET component catalog.
Unfortunately the current design of ML.NET means it's possible to construct pipelines and request their execution without ever having loaded the required assemblies: the component catalog just assumes the assemblies are already loaded somewhere in the current process and if they aren't a crash happens.
I'll adjust @isaacaabraham's example, add a test and add a separate issue to suggest making the component catalog more amenable to scripting environments.
Closing this as this is by design for now, the workaround above of using typeof
to load the appropriate feature DLL is ok for now
System information
Issue
Similar to https://github.com/dotnet/machinelearning/issues/92 I'm trying to run the example in F#. It works fine when I run it with
(similar to the code here: https://github.com/isaacabraham/ml-test-experiment/blob/master/mlnet.fsx ). However when I send the source code interactively to the REPL I get an exception when I call the
Train<..>
method:When I run
in the REPL I get:
Are there any workaround I can use to get this module into the module list? Ping @isaacabraham