| 721 | } |
| 722 | |
| 723 | void 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 | |
| 761 | void TLearnProgress::Load(IInputStream* s) { |
| 762 | ::Load(s, SerializedTrainParams); |
nothing calls this directly
no test coverage detected