Skip to content

Trainer Entrypoints should allow validation set/preinitialization of model states for learners that support them #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TomFinley opened this issue Jun 1, 2018 · 3 comments
Labels
API Issues pertaining the friendly API enhancement New feature or request P2 Priority of the issue for triage purpose: Needs to be fixed at some point.

Comments

@TomFinley
Copy link
Contributor

The underlying trainer implementations can implement IIncrementalTrainer (for preinitializing models, or online training) or IValidatingTrainer (for models that have validation sets). As far as I see, however, no trainer actually puts optional inputs for a validation set or an incremental training in their entry-point inputs.

For example: we have this learner here.

public sealed class StochasticGradientDescentClassificationTrainer :
LinearTrainerBase<IPredictor>,
IIncrementalTrainer<RoleMappedData, IPredictor>,

Yet, the input uses the same general type of input used by practically all the typical trainers, without any sort of initial predictor.

[TlcModule.EntryPoint(Name = "Trainers.StochasticGradientDescentBinaryClassifier", Desc = "Train an Hogwild SGD binary model.", UserName = UserNameValue, ShortName = ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, Arguments input)

This results in the unfortunate situation that while the underlying runtime code does implement code to enable some form of online learning, the new public API has does not actually expose that to users. See e.g., #257 for a request for this.

@TomFinley TomFinley added enhancement New feature or request API Issues pertaining the friendly API labels Jun 1, 2018
@shauheen shauheen added this to the 0718 milestone Jun 28, 2018
@shauheen shauheen removed this from the 0718 milestone Aug 4, 2018
@TomFinley
Copy link
Contributor Author

Since the API is no longer entry-point based this has considerably less urgency from ML.NET's perspective. Nonetheless, it may be important for entry-point based interfaces to ML.NET, e.g., NimbusML, so this is not quite ready to close.

@harishsk harishsk added the P2 Priority of the issue for triage purpose: Needs to be fixed at some point. label Jan 12, 2020
@michaelgsharp
Copy link
Contributor

The reason the leave this open was because of "entry-point based interfaces to ML.NET". Since NimbusML is no longer being supported, and the code has changed a lot since this was opened (IIncrementalTrainer doesn't exist anymore for example), I think we are good to close this issue. We can create a new one if the issue arises again, but its not an issue for ML.NET itself.

Thoughts @briacht

@briacht
Copy link
Contributor

briacht commented Jul 28, 2021

I think it's ok to close this issue, though we may want to look more at online training in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues pertaining the friendly API enhancement New feature or request P2 Priority of the issue for triage purpose: Needs to be fixed at some point.
Projects
None yet
Development

No branches or pull requests

5 participants