Skip to content

FastTree and LightGbm base class is specific to Ranking #3556

Closed as not planned

Description

@artidoro

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:

/// <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.

Activity

  1. artidoro commented on May 29, 2019

    @artidoro
    ContributorAuthor

    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.

  2. added
    Priority:2Work that is important, but not critical for the release
    area-TreesTree-based trainers, including FastTree and LightGBM
    and removed on Sep 8, 2026
  3. matouskozak commented on Oct 23, 2026

    @matouskozak
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasearea-TreesTree-based trainers, including FastTree and LightGBMbugSomething isn't workingyellowmaintenance only

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions