Repository navigation
FastTree and LightGbm base class is specific to Ranking #3556
Copy link
Copy link
Closed as not planned
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-TreesTree-based trainers, including FastTree and LightGBMTree-based trainers, including FastTree and LightGBMbugSomething isn't workingSomething isn't workingyellowmaintenance onlymaintenance only
Description
The only training task that requires a RowGroupColumn is ranking. However, the base class of FastTree, FastForest and LightGbm requires it:
| public abstract class TrainerEstimatorBaseWithGroupId<TTransformer, TModel> : TrainerEstimatorBase<TTransformer, TModel> |
The same is true for the options classes in FastTree, FastForest and LightGbm:
machinelearning/src/Microsoft.ML.Data/Training/TrainerInputBase.cs
Lines 98 to 111 in 70ef7ec
| /// <summary> | |
| /// The base class for all trainer inputs that support a group column. | |
| /// </summary> | |
| [TlcModule.EntryPointKind(typeof(CommonInputs.ITrainerInputWithGroupId))] | |
| public abstract class TrainerInputBaseWithGroupId : TrainerInputBaseWithWeight | |
| { | |
| private protected TrainerInputBaseWithGroupId() { } | |
| /// <summary> | |
| /// Column to use for example groupId. | |
| /// </summary> | |
| [Argument(ArgumentType.AtMostOnce, HelpText = "Column to use for example groupId", ShortName = "groupId", SortOrder = 5, Visibility = ArgumentAttribute.VisibilityType.EntryPointsOnly)] | |
| public string RowGroupColumnName = null; | |
| } |
We should fix the class hierarchy so that the base classes become TrainerEstimatorBase instead of TrainerEstimatorBaseWithGroupId and TrainerInputBaseWithWeight instead of TrainerInputBaseWithGroupId. This is a breaking API change.
This related to #3365.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Priority:2Work that is important, but not critical for the releaseWork that is important, but not critical for the releasearea-TreesTree-based trainers, including FastTree and LightGBMTree-based trainers, including FastTree and LightGBMbugSomething isn't workingSomething isn't workingyellowmaintenance onlymaintenance only
Activity
artidoro commentedon May 29, 2019
I am afraid that this will require a breaking API change at this point. This is something that we should consider fixing for 2.0. I am switching the label to keep track of these problems.
matouskozak commentedon Oct 23, 2026
Triage: This looks like an old API-design debt. We currently do not plan to introduce breaking changes in this domain so I'll close this as not planned.