You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following examples shows a way to retrieved the underlying model learned by a trainer, but I failed compiling it. For static APIs, we are able to assign FastTreeRegressionModelParameters to pred but in the corresponding dynamic API, the type of p becomes
In addition to regression, I can also demonstrate a related bug using FastTree for binary classification.
varml=newMLContext(seed:1,conc:1);vardata=ml.Data.ReadFromTextFile<SentimentData>(GetDataPath(TestDatasets.Sentiment.trainFilename),hasHeader:true);vartrainer=ml.BinaryClassification.Trainers.FastTree(numLeaves:5,numTrees:3);BinaryPredictionTransformer<IPredictorWithFeatureWeights<float>>pred=null;vardecoratedTrainer=trainer.WithOnFitDelegate((p)=>{pred=p;// This line will never be executed.});varpipeline=ml.Transforms.Text.FeaturizeText("SentimentText","Features").AppendCacheCheckpoint(ml).Append(decoratedTrainer);// Replace "decoratedTrainer" with "trainer" will not trigger the assignment of pred, so pred will be bull.// Train.varmodel=pipeline.Fit(data);
Basically, the onFit is not implemented for at least FastTree and SDCA.
[Update] This is a false alarm. Please see the change made in the last edit.
wschin
changed the title
Accessibility Problem of FastTreeRegressionModelParameters through Dynamic APIs
Accessibility Problem of FastTree and SDCA through Dynamic APIs
Jan 30, 2019
wschin
changed the title
Accessibility Problem of FastTree and SDCA through Dynamic APIs
Accessibility Problem of FastTree through Dynamic APIs
Feb 1, 2019
Uh oh!
There was an error while loading. Please reload this page.
The following examples shows a way to retrieved the underlying model learned by a trainer, but I failed compiling it. For static APIs, we are able to assign
FastTreeRegressionModelParameters
topred
but in the corresponding dynamic API, the type ofp
becomes, which doesn't publicly expose `FastTreeRegressionModelParameters as one of its field.
Any tricks I can use to make this code example compiled without using internal classes? Or we need to modify our dynamic APIs?
cc @TomFinley, @Ivanidzo4ka, @sfilipi, @zeahmed.
We also should add an example using public interfaces introduced in #2243 after fixing this issue.
The text was updated successfully, but these errors were encountered: