MCPcopy Create free account
hub / github.com/catboost/catboost / Save

Method Save

catboost/private/libs/algo/learn_context.cpp:723–759  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721}
722
723void TLearnProgress::Save(IOutputStream* s) const {
724 CB_ENSURE_INTERNAL(IsFoldsAndApproxDataValid, "Attempt to save TLearnProgress data in inconsistent state");
725
726 ::Save(s, SerializedTrainParams);
727 ::Save(s, EnableSaveLoadApprox);
728 if (EnableSaveLoadApprox) {
729 ui64 foldCount = Folds.size();
730 ::Save(s, foldCount);
731 for (ui64 i = 0; i < foldCount; ++i) {
732 Folds[i].SaveApproxes(s);
733 }
734 AveragingFold.SaveApproxes(s);
735 ::Save(s, AvrgApprox);
736 }
737 ::SaveMany(
738 s,
739 TestApprox,
740 BestTestApprox,
741 CatFeatures,
742 FloatFeatures,
743 ApproxDimension,
744 TreeStruct,
745 TreeStats,
746 LeafValues,
747 ModelShrinkHistory,
748 InitTreesSize,
749 MetricsAndTimeHistory,
750 UsedCtrSplits,
751 LearnAndTestQuantizedFeaturesCheckSum,
752 SeparateInitModelTreesSize,
753 SeparateInitModelCheckSum,
754 Rand,
755 StartingApprox,
756 UsedFeatures,
757 UsedFeaturesPerObject
758 );
759}
760
761void TLearnProgress::Load(IInputStream* s) {
762 ::Load(s, SerializedTrainParams);

Callers

nothing calls this directly

Calls 4

SaveManyFunction · 0.85
SaveApproxesMethod · 0.80
SaveFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected