dotnet / machinelearning

ML.NET is an open source and cross-platform machine learning framework for .NET.
https://dot.net/ml
MIT License
9.04k stars 1.89k forks source link

Entry point 'Transforms.TextFeaturizer' not found when using F# Interactive #401

Closed rauhs closed 6 years ago

rauhs commented 6 years ago

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

fsi --exec imdb_sentiment.fsx

(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:

System.InvalidOperationException: Entry point 'Transforms.TextFeaturizer' not found
   at Microsoft.ML.Runtime.EntryPoints.EntryPointNode..ctor(IHostEnvironment env, ModuleCatalog moduleCatalog, RunContext context, String id, String entryPointName, JObject inputs, JObject outputs, Boolean checkpoint, String stageId, Single cost)
   at Microsoft.ML.Runtime.EntryPoints.EntryPointNode.ValidateNodes(IHostEnvironment env, RunContext context, JArray nodes, ModuleCatalog moduleCatalog)
   at Microsoft.ML.Runtime.EntryPoints.EntryPointGraph..ctor(IHostEnvironment env, ModuleCatalog moduleCatalog, JArray nodes)
   at Microsoft.ML.Runtime.Experiment.Compile()
   at Microsoft.ML.LearningPipeline.Train[TInput,TOutput]()

When I run

let env = new TlcEnvironment(new Nullable<int>(), false, MessageSensitivity.Unknown, 0, null, null)
ModuleCatalog.CreateInstance(env).AllEntryPoints()

in the REPL I get:

val it : Collections.Generic.IEnumerable<ModuleCatalog.EntryPointInfo> =
  [|Models.BinaryCrossValidator: Cross validation for binary classification
      {Description = "Cross validation for binary classification";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+Arguments;
       Method = MacroOutput`1 CrossValidateBinary(Microsoft.ML.Runtime.IHostEnvironment, Arguments, Microsoft.ML.Runtime.EntryPoints.EntryPointNode);
       Name = "Models.BinaryCrossValidator";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+Output];
       ShortName = null;};
    Data.PredictorModelArrayConverter: Create an array variable of IPredictorModel
      {Description = "Create an array variable of IPredictorModel";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+ArrayIPredictorModelInput;
       Method = ArrayIPredictorModelOutput MakeArray(Microsoft.ML.Runtime.IHostEnvironment, ArrayIPredictorModelInput);
       Name = "Data.PredictorModelArrayConverter";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+ArrayIPredictorModelOutput;
       ShortName = null;};
    Data.TransformModelArrayConverter: Create an array variable of ITransformModel
      {Description = "Create an array variable of ITransformModel";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+ArrayITransformModelInput;
       Method = ArrayITransformModelOutput MakeArray(Microsoft.ML.Runtime.IHostEnvironment, ArrayITransformModelInput);
       Name = "Data.TransformModelArrayConverter";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+ArrayITransformModelOutput;
       ShortName = null;};
    Data.IDataViewArrayConverter: Create an array variable of IDataView
      {Description = "Create an array variable of IDataView";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+ArrayIDataViewInput;
       Method = ArrayIDataViewOutput MakeArray(Microsoft.ML.Runtime.IHostEnvironment, ArrayIDataViewInput);
       Name = "Data.IDataViewArrayConverter";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationBinaryMacro+ArrayIDataViewOutput;
       ShortName = null;};
    Models.CrossValidator: Cross validation for general learning
      {Description = "Cross validation for general learning";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationMacro+Arguments;
       Method = MacroOutput`1 CrossValidate(Microsoft.ML.Runtime.IHostEnvironment, Arguments, Microsoft.ML.Runtime.EntryPoints.EntryPointNode);
       Name = "Models.CrossValidator";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.CrossValidationMacro+Output];
       ShortName = null;};
    Models.CrossValidationResultsCombiner: Combine the metric data views returned from cross validation.
      {Description = "Combine the metric data views returned from cross validation.";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationMacro+CombineMetricsInput;
       Method = CombinedOutput CombineMetrics(Microsoft.ML.Runtime.IHostEnvironment, CombineMetricsInput);
       Name = "Models.CrossValidationResultsCombiner";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CrossValidationMacro+CombinedOutput;
       ShortName = null;};
    Models.CrossValidatorDatasetSplitter: Split the dataset into the specified number of cross-validation folds (train and test sets)
      {Description = "Split the dataset into the specified number of cross-validation folds (train and test sets)";
       FriendlyName = "Dataset CV Split";
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.CVSplit+Input;
       Method = Output Split(Microsoft.ML.Runtime.IHostEnvironment, Input);
       Name = "Models.CrossValidatorDatasetSplitter";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CVSplit+Output;
       ShortName = null;};
    Data.DataViewReference: Pass dataview from memory to experiment
      {Description = "Pass dataview from memory to experiment";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.DataViewReference+Input;
       Method = Output ImportData(Microsoft.ML.Runtime.IHostEnvironment, Input);
       Name = "Data.DataViewReference";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.DataViewReference+Output;
       ShortName = null;};
    Transforms.FeatureCombiner: Combines all the features into one feature column.
      {Description = "Combines all the features into one feature column.";
       FriendlyName = "Feature Combiner";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+FeatureCombinerInput;
       Method = TransformOutput PrepareFeatures(Microsoft.ML.Runtime.IHostEnvironment, FeatureCombinerInput);
       Name = "Transforms.FeatureCombiner";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "fc";};
    Transforms.LabelColumnKeyBooleanConverter: Transforms the label to either key or bool (if needed) to make it suitable for classification.
      {Description = "Transforms the label to either key or bool (if needed) to make it suitable for classification.";
       FriendlyName = "Prepare Classification Label";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+ClassificationLabelInput;
       Method = TransformOutput PrepareClassificationLabel(Microsoft.ML.Runtime.IHostEnvironment, ClassificationLabelInput);
       Name = "Transforms.LabelColumnKeyBooleanConverter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = null;};
    Transforms.PredictedLabelColumnOriginalValueConverter: Transforms a predicted label column to its original values, unless it is of type bool.
      {Description = "Transforms a predicted label column to its original values, unless it is of type bool.";
       FriendlyName = "Convert Predicted Label";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+PredictedLabelInput;
       Method = TransformOutput ConvertPredictedLabel(Microsoft.ML.Runtime.IHostEnvironment, PredictedLabelInput);
       Name = "Transforms.PredictedLabelColumnOriginalValueConverter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = null;};
    Transforms.LabelToFloatConverter: Transforms the label to float to make it suitable for regression.
      {Description = "Transforms the label to float to make it suitable for regression.";
       FriendlyName = "Prepare Regression Label";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.FeatureCombiner+RegressionLabelInput;
       Method = TransformOutput PrepareRegressionLabel(Microsoft.ML.Runtime.IHostEnvironment, RegressionLabelInput);
       Name = "Transforms.LabelToFloatConverter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = null;};
    Data.CustomTextLoader: Import a dataset from a text file
      {Description = "Import a dataset from a text file";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ImportTextData+Input;
       Method = Output ImportText(Microsoft.ML.Runtime.IHostEnvironment, Input);
       Name = "Data.CustomTextLoader";
       ObsoleteAttribute = System.ObsoleteAttribute;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ImportTextData+Output;
       ShortName = null;};
    Data.TextLoader: Import a dataset from a text file
      {Description = "Import a dataset from a text file";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.ILearningPipelineLoader|];
       InputType = Microsoft.ML.Runtime.EntryPoints.ImportTextData+LoaderInput;
       Method = Output TextLoader(Microsoft.ML.Runtime.IHostEnvironment, LoaderInput);
       Name = "Data.TextLoader";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ImportTextData+Output;
       ShortName = null;};
    Transforms.ModelCombiner: Combines a sequence of TransformModels into a single model
      {Description = "Combines a sequence of TransformModels into a single model";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+CombineTransformModelsInput;
       Method = CombineTransformModelsOutput CombineTransformModels(Microsoft.ML.Runtime.IHostEnvironment, CombineTransformModelsInput);
       Name = "Transforms.ModelCombiner";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+CombineTransformModelsOutput;
       ShortName = null;};
    Transforms.ManyHeterogeneousModelCombiner: Combines a sequence of TransformModels and a PredictorModel into a single PredictorModel.
      {Description = "Combines a sequence of TransformModels and a PredictorModel into a single PredictorModel.";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelInput;
       Method = PredictorModelOutput CombineModels(Microsoft.ML.Runtime.IHostEnvironment, PredictorModelInput);
       Name = "Transforms.ManyHeterogeneousModelCombiner";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelOutput;
       ShortName = null;};
    Transforms.TwoHeterogeneousModelCombiner: Combines a TransformModel and a PredictorModel into a single PredictorModel.
      {Description = "Combines a TransformModel and a PredictorModel into a single PredictorModel.";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+SimplePredictorModelInput;
       Method = PredictorModelOutput CombineTwoModels(Microsoft.ML.Runtime.IHostEnvironment, SimplePredictorModelInput);
       Name = "Transforms.TwoHeterogeneousModelCombiner";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+PredictorModelOutput;
       ShortName = null;};
    Models.DatasetTransformer: Applies a TransformModel to a dataset.
      {Description = "Applies a TransformModel to a dataset.";
       FriendlyName = "Apply Transform Model Output";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+ApplyTransformModelInput;
       Method = ApplyTransformModelOutput Apply(Microsoft.ML.Runtime.IHostEnvironment, ApplyTransformModelInput);
       Name = "Models.DatasetTransformer";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ModelOperations+ApplyTransformModelOutput;
       ShortName = null;};
    Models.OneVersusAll: One-vs-All macro (OVA)
      {Description = "One-vs-All macro (OVA)";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITrainerInputWithWeight;
                      Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITrainerInputWithLabel;
                      Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITrainerInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.OneVersusAllMacro+Arguments;
       Method = MacroOutput`1 OVA(Microsoft.ML.Runtime.IHostEnvironment, Arguments, Microsoft.ML.Runtime.EntryPoints.EntryPointNode);
       Name = "Models.OneVersusAll";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.OneVersusAllMacro+Output];
       ShortName = null;};
    Models.TrainTestBinaryEvaluator: Train test for binary classification
      {Description = "Train test for binary classification";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.TrainTestBinaryMacro+Arguments;
       Method = MacroOutput`1 TrainTestBinary(Microsoft.ML.Runtime.IHostEnvironment, Arguments, Microsoft.ML.Runtime.EntryPoints.EntryPointNode);
       Name = "Models.TrainTestBinaryEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.TrainTestBinaryMacro+Output];
       ShortName = null;};
    Models.TrainTestEvaluator: General train test for any supported evaluator
      {Description = "General train test for any supported evaluator";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.TrainTestMacro+Arguments;
       Method = MacroOutput`1 TrainTest(Microsoft.ML.Runtime.IHostEnvironment, Arguments, Microsoft.ML.Runtime.EntryPoints.EntryPointNode);
       Name = "Models.TrainTestEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MacroOutput`1[Microsoft.ML.Runtime.EntryPoints.TrainTestMacro+Output];
       ShortName = null;};
    Transforms.TrainTestDatasetSplitter: Split the dataset into train and test sets
      {Description = "Split the dataset into train and test sets";
       FriendlyName = "Dataset Train-Test Split";
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.TrainTestSplit+Input;
       Method = Output Split(Microsoft.ML.Runtime.IHostEnvironment, Input);
       Name = "Transforms.TrainTestDatasetSplitter";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.TrainTestSplit+Output;
       ShortName = null;};
    Transforms.DataCache: Caches using the specified cache option.
      {Description = "Caches using the specified cache option.";
       FriendlyName = "Cache Data";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.Cache+CacheInput;
       Method = CacheOutput CacheData(Microsoft.ML.Runtime.IHostEnvironment, CacheInput);
       Name = "Transforms.DataCache";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.Cache+CacheOutput;
       ShortName = null;};
    Transforms.ColumnConcatenator: Concatenates two columns of the same item type.
      {Description = "Concatenates two columns of the same item type.";
       FriendlyName = "Concat Transform";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.ConcatTransform+Arguments;
       Method = TransformOutput ConcatColumns(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.ColumnConcatenator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Concat";};
    Transforms.ColumnSelector: Selects a set of columns, dropping all others
      {Description = "Selects a set of columns, dropping all others";
       FriendlyName = "Select Columns";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.DropColumnsTransform+KeepArguments;
       Method = TransformOutput SelectColumns(Microsoft.ML.Runtime.IHostEnvironment, KeepArguments);
       Name = "Transforms.ColumnSelector";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = null;};
    Transforms.ColumnCopier: Duplicates columns from the dataset
      {Description = "Duplicates columns from the dataset";
       FriendlyName = "Copy Columns Transform";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.CopyColumnsTransform+Arguments;
       Method = TransformOutput CopyColumns(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.ColumnCopier";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Copy";};
    Transforms.ColumnDropper: Drops columns from the dataset
      {Description = "Drops columns from the dataset";
       FriendlyName = "Drop Columns Transform";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.DropColumnsTransform+Arguments;
       Method = TransformOutput DropColumns(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.ColumnDropper";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Drop";};
    Transforms.ScoreColumnSelector: Selects only the last score columns and the extra columns specified in the arguments.
      {Description = "Selects only the last score columns and the extra columns specified in the arguments.";
       FriendlyName = "Choose Columns By Index";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+ScoreColumnSelectorInput;
       Method = TransformOutput SelectColumns(Microsoft.ML.Runtime.IHostEnvironment, ScoreColumnSelectorInput);
       Name = "Transforms.ScoreColumnSelector";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = null;};
    Transforms.BinaryPredictionScoreColumnsRenamer: For binary prediction, it renames the PredictedLabel and Score columns to include the name of the positive class.
      {Description = "For binary prediction, it renames the PredictedLabel and Score columns to include the name of the positive class.";
       FriendlyName = "Rename Binary Prediction Score Columns";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+RenameBinaryPredictionScoreColumnsInput;
       Method = TransformOutput RenameBinaryPredictionScoreColumns(Microsoft.ML.Runtime.IHostEnvironment, RenameBinaryPredictionScoreColumnsInput);
       Name = "Transforms.BinaryPredictionScoreColumnsRenamer";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = null;};
    Transforms.DatasetScorer: Score a dataset with a predictor model
      {Description = "Score a dataset with a predictor model";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+Input;
       Method = Output Score(Microsoft.ML.Runtime.IHostEnvironment, Input);
       Name = "Transforms.DatasetScorer";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output;
       ShortName = null;};
    Transforms.DatasetTransformScorer: Score a dataset with a transform model
      {Description = "Score a dataset with a transform model";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+InputTransformScorer;
       Method = Output ScoreUsingTransform(Microsoft.ML.Runtime.IHostEnvironment, InputTransformScorer);
       Name = "Transforms.DatasetTransformScorer";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output;
       ShortName = null;};
    Transforms.Scorer: Turn the predictor model into a transform model
      {Description = "Turn the predictor model into a transform model";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+ModelInput;
       Method = Output MakeScoringTransform(Microsoft.ML.Runtime.IHostEnvironment, ModelInput);
       Name = "Transforms.Scorer";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.ScoreModel+Output;
       ShortName = null;};
    Transforms.RowRangeFilter: Filters a dataview on a column of type Single, Double or Key (contiguous). Keeps the values that are in the specified min/max range. NaNs are always filtered out. If the input is a Key type, the min/max are considered percentages of the number of values.
      {Description = "Filters a dataview on a column of type Single, Double or Key (contiguous). Keeps the values that are in the specified min/max range. NaNs are always filtered out. If the input is a Key type, the min/max are considered percentages of the number of values.";
       FriendlyName = "Range Filter";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.RangeFilter+Arguments;
       Method = TransformOutput FilterByRange(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.RowRangeFilter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "RangeFilter";};
    Transforms.RowSkipFilter: Allows limiting input to a subset of rows by skipping a number of rows.
      {Description = "Allows limiting input to a subset of rows by skipping a number of rows.";
       FriendlyName = "Skip Filter";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.SkipTakeFilter+SkipArguments;
       Method = TransformOutput SkipFilter(Microsoft.ML.Runtime.IHostEnvironment, SkipArguments);
       Name = "Transforms.RowSkipFilter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Skip";};
    Transforms.RowTakeFilter: Allows limiting input to a subset of rows by taking N first rows.
      {Description = "Allows limiting input to a subset of rows by taking N first rows.";
       FriendlyName = "Take Filter";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.SkipTakeFilter+TakeArguments;
       Method = TransformOutput TakeFilter(Microsoft.ML.Runtime.IHostEnvironment, TakeArguments);
       Name = "Transforms.RowTakeFilter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Take";};
    Transforms.RowSkipAndTakeFilter: Allows limiting input to a subset of rows at an optional offset.  Can be used to implement data paging.
      {Description = "Allows limiting input to a subset of rows at an optional offset.  Can be used to implement data paging.";
       FriendlyName = "Skip and Take Filter";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.SkipTakeFilter+Arguments;
       Method = TransformOutput SkipAndTakeFilter(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.RowSkipAndTakeFilter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "SkipTake";};
    Models.Summarizer: Summarize a linear regression predictor.
      {Description = "Summarize a linear regression predictor.";
       FriendlyName = null;
       InputKinds = null;
       InputType = Microsoft.ML.Runtime.EntryPoints.SummarizePredictor+Input;
       Method = SummaryOutput Summarize(Microsoft.ML.Runtime.IHostEnvironment, Input);
       Name = "Models.Summarizer";
       ObsoleteAttribute = null;
       OutputKinds = null;
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+SummaryOutput;
       ShortName = null;};
    Models.AnomalyDetectionEvaluator: Evaluates an anomaly detection scored dataset.
      {Description = "Evaluates an anomaly detection scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.AnomalyDetectionMamlEvaluator+Arguments;
       Method = CommonEvaluateOutput AnomalyDetection(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.AnomalyDetectionEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CommonEvaluateOutput;
       ShortName = null;};
    Models.BinaryClassificationEvaluator: Evaluates a binary classification scored dataset.
      {Description = "Evaluates a binary classification scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.BinaryClassifierMamlEvaluator+Arguments;
       Method = ClassificationEvaluateOutput Binary(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.BinaryClassificationEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IClassificationEvaluatorOutput;
                       Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ClassificationEvaluateOutput;
       ShortName = null;};
    Models.ClusterEvaluator: Evaluates a clustering scored dataset.
      {Description = "Evaluates a clustering scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.ClusteringMamlEvaluator+Arguments;
       Method = CommonEvaluateOutput Clustering(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.ClusterEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CommonEvaluateOutput;
       ShortName = null;};
    Models.ClassificationEvaluator: Evaluates a multi class classification scored dataset.
      {Description = "Evaluates a multi class classification scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.MultiClassMamlEvaluator+Arguments;
       Method = ClassificationEvaluateOutput MultiClass(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.ClassificationEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IClassificationEvaluatorOutput;
                       Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ClassificationEvaluateOutput;
       ShortName = null;};
    Models.MultiOutputRegressionEvaluator: Evaluates a multi output regression scored dataset.
      {Description = "Evaluates a multi output regression scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.MultiOutputRegressionMamlEvaluator+Arguments;
       Method = CommonEvaluateOutput MultiOutputRegression(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.MultiOutputRegressionEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CommonEvaluateOutput;
       ShortName = null;};
    Models.QuantileRegressionEvaluator: Evaluates a quantile regression scored dataset.
      {Description = "Evaluates a quantile regression scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.QuantileRegressionMamlEvaluator+Arguments;
       Method = CommonEvaluateOutput QuantileRegression(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.QuantileRegressionEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CommonEvaluateOutput;
       ShortName = null;};
    Models.RankerEvaluator: Evaluates a ranking scored dataset.
      {Description = "Evaluates a ranking scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.RankerMamlEvaluator+Arguments;
       Method = CommonEvaluateOutput Ranking(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.RankerEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CommonEvaluateOutput;
       ShortName = null;};
    Models.RegressionEvaluator: Evaluates a regression scored dataset.
      {Description = "Evaluates a regression scored dataset.";
       FriendlyName = null;
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+IEvaluatorInput|];
       InputType = Microsoft.ML.Runtime.Data.RegressionMamlEvaluator+Arguments;
       Method = CommonEvaluateOutput Regression(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Models.RegressionEvaluator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+IEvaluatorOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CommonEvaluateOutput;
       ShortName = null;};
    Models.PlattCalibrator: Apply a Platt calibrator to an input model
      {Description = "Apply a Platt calibrator to an input model";
       FriendlyName = "Sigmoid Calibration";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ICalibratorInput;
                      Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Internal.Calibration.Calibrate+NoArgumentsInput;
       Method = CalibratorOutput Platt(Microsoft.ML.Runtime.IHostEnvironment, NoArgumentsInput);
       Name = "Models.PlattCalibrator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ICalibratorOutput;
                       Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITrainerOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CalibratorOutput;
       ShortName = null;};
    Models.NaiveCalibrator: Apply a Naive calibrator to an input model
      {Description = "Apply a Naive calibrator to an input model";
       FriendlyName = "Naive Calibrator";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ICalibratorInput;
                      Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Internal.Calibration.Calibrate+NoArgumentsInput;
       Method = CalibratorOutput Naive(Microsoft.ML.Runtime.IHostEnvironment, NoArgumentsInput);
       Name = "Models.NaiveCalibrator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ICalibratorOutput;
                       Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITrainerOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CalibratorOutput;
       ShortName = null;};
    Models.PAVCalibrator: Apply a PAV calibrator to an input model
      {Description = "Apply a PAV calibrator to an input model";
       FriendlyName = "PAV Calibration";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ICalibratorInput;
                      Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Internal.Calibration.Calibrate+NoArgumentsInput;
       Method = CalibratorOutput Pav(Microsoft.ML.Runtime.IHostEnvironment, NoArgumentsInput);
       Name = "Models.PAVCalibrator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ICalibratorOutput;
                       Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITrainerOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CalibratorOutput;
       ShortName = null;};
    Models.FixedPlattCalibrator: Apply a Platt calibrator with a fixed slope and offset to an input model
      {Description = "Apply a Platt calibrator with a fixed slope and offset to an input model";
       FriendlyName = "Fixed Sigmoid Calibration";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ICalibratorInput;
                      Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Internal.Calibration.Calibrate+FixedPlattInput;
       Method = CalibratorOutput FixedPlatt(Microsoft.ML.Runtime.IHostEnvironment, FixedPlattInput);
       Name = "Models.FixedPlattCalibrator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ICalibratorOutput;
                       Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITrainerOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+CalibratorOutput;
       ShortName = null;};
    Transforms.ColumnTypeConverter: Converts a column to a different type, using standard conversions.
      {Description = "Converts a column to a different type, using standard conversions.";
       FriendlyName = "Convert Transform";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.ConvertTransform+Arguments;
       Method = TransformOutput Convert(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.ColumnTypeConverter";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Convert";};
    Transforms.RandomNumberGenerator: Adds a column with a generated number sequence.
      {Description = "Adds a column with a generated number sequence.";
       FriendlyName = "Generate Number Transform";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.GenerateNumberTransform+Arguments;
       Method = TransformOutput Generate(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.RandomNumberGenerator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Generate";};
    Transforms.LabelIndicator: Label remapper used by OVA
      {Description = "Label remapper used by OVA";
       FriendlyName = "LabelIndicator";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.LabelIndicatorTransform+Arguments;
       Method = TransformOutput LabelIndicator(Microsoft.ML.Runtime.IHostEnvironment, Arguments);
       Name = "Transforms.LabelIndicator";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "LabelIndictator";};
    Transforms.NoOperation: Does nothing.
      {Description = "Does nothing.";
       FriendlyName = "No Op";
       InputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonInputs+ITransformInput|];
       InputType = Microsoft.ML.Runtime.Data.NopTransform+NopInput;
       Method = TransformOutput Nop(Microsoft.ML.Runtime.IHostEnvironment, NopInput);
       Name = "Transforms.NoOperation";
       ObsoleteAttribute = null;
       OutputKinds = [|Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ITransformOutput|];
       OutputType = Microsoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput;
       ShortName = "Nop";}|]

Are there any workaround I can use to get this module into the module list? Ping @isaacabraham

dsyme commented 6 years ago

Just to mention that I noticed this as well when using "master"

dsyme commented 6 years ago

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.

dsyme commented 6 years ago

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