MulticlassClassificationExperiment preFeaturizer not acting on the schema
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- csharp
調査の方向性
まず、MulticlassClassificationExperiment.Execute を追跡し、スキーマ検証中にその preFeaturizer がどのように処理されるかを確認します。提供されている MulticlassExperimentSettings の例を使用して、DropColumns と CustomMapping で問題を再現します。preFeaturizer の結果のスキーマが検証に使用され、トレーニングと予測を通じて変換が正しく保持されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
System Information (please complete the following information):
- OS & Version: Windows 11
- ML.NET Version: ML.NET v4.0.2 & Auto ML.NET v0.22.2
- .NET Version: .NET 10
Describe the bug
When using a transform like DropColumns or CustomMapping the resulting transform is not taken into account as the new schema. This causes Schema validation errors with our even applying the transforms. For instance, with the following code applied outside of the will work when passed outside of the preFeaturizer, but when used as an input it fails saying it cannot find the column. If a custom mapper is used the reverse problems happen where an output schema is not seen and the columns type is rejected.
"csharp var transformedData = ctx.Transforms.DropColumns([HybridClassifierInputModel.imageSource]).Fit(fullData).Transform(fullData);"
This will also result in errors after training where you will need to manually apply the transform before the predictor.
To Reproduce
Steps to reproduce the behavior:
- Create a IDataView with a schema
- Set up an experiment for the MulticlassExperimentSettings
- Try any preFeaturizer where you would drop a column or try to change the schema too much. DropColumns or SelectColumns are perfect examples
Expected behavior
I would expect the transformer in preFeaturizer to be applied before the validation. Thus, it would allow for column drops or when working with data that must be massaged, or you are using in multiple ways.
Screenshots, Code, Sample Projects
MulticlassExperimentSettings textModelSettings = new MulticlassExperimentSettings()
{
OptimizingMetric = OptimizingMetric,
MaxExperimentTimeInSeconds = maxTrainTimeInSeconds,
//CacheBeforeTrainer = CacheBeforeTrainer.On,
CacheDirectoryName = Environment.CurrentDirectory, // Skip the disk and store in-memory
};
//var transformedData = ctx.Transforms.DropColumns([HybridClassifierInputModel.imageSource]).Fit(fullData).Transform(fullData);
MulticlassClassificationExperiment experiment = ctx.Auto().CreateMulticlassClassificationExperiment(textModelSettings);
TrainTestData trainValidationData = ctx.Data.TrainTestSplit(ctx.Data.ShuffleRows(transformedData), testFraction: 0.2);
ExperimentResult <MulticlassClassificationMetrics> result = experiment.Execute(trainData: trainValidationData.TrainSet,
//preFeaturizer: ctx.Transforms.CustomMapping<HybridClassifierInputModel, TextClassifierInputModel>(HybridToTextCustomAction.CustomAction, nameof(HybridToTextCustomAction), outputSchemaDefinition: SchemaDefinition.Create(typeof(TextClassifierInputModel))),
preFeaturizer: ctx.Transforms.DropColumns([HybridClassifierInputModel.imageSource]),
validationData: trainValidationData.TestSet,
labelColumnName: HybridClassifierInputModel.target,
progressHandler: new TextCPUMlClassifierProgressHandler<IHybridMlClassifierService>(Logger));
Additional context
I would have like to use the data to train more than one model, but it needs some small data changes for either one. I have a custom IDataView that attaches to a DbLite. It would be good if the preFeature worked so that it could stream the data.
- 主要言語
- C#
- スター
- 9.4k
- フォーク
- 2k
- 平均マージ
- 2日 18時間
- マージ済み PR(30日)
- 64
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/machinelearning のほかの issue
-
area-Native untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
dotnet/machinelearning#7837 ·
メンテナーはふだん 1 日以内に返信
-
area-TensorFlow untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dotnet/machinelearning#7836 ·
メンテナーはふだん 1 日以内に返信
-
ToArrowRecordBatches accumulates arrays from previous batches, producing invalid record batchesオープンarea-DataFrame bug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dotnet/machinelearning#7799 ·
メンテナーはふだん 1 日以内に返信
-
LlamaTokenizer encodes some runs of repeated characters differently from SentencePiece対応中かも @Laurianti が 42 日前に担当しました。 オープンarea-Tokenizers untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
dotnet/machinelearning#7751 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
BertTokenizer merges words separated only by `\n`, `\t` or `\r`対応中かも @Laurianti が 23 日前に担当しました。 オープンarea-Tokenizers green
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dotnet/machinelearning#7724 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
dotnet/machinelearning の issue をすべて見る
似ている issue
-
bug emitter:client:csharp
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
microsoft/typespec#12572 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-area-label
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
AWS Lambda: KeyNotFoundException drops HTTP-triggered transactions when allowAllHeaders is disabledオープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
newrelic/newrelic-dotnet-agent#3949 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area-networking
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/aspnetcore#70545 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
メンテナーはふだん 1 日以内に返信