Skip to content

Commit

Permalink
Find invalid version string.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Dec 5, 2022
1 parent 4ea07f2 commit badf912
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/learner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ class LearnerConfiguration : public Learner {
// If configuration is loaded, ensure that the model came from the same version
CHECK(IsA<Object>(in));
auto origin_version = Version::Load(in);
if (std::get<0>(Version::kInvalid) == std::get<0>(origin_version)) {
LOG(WARNING) << "Invalid version string in config";
}

if (!Version::Same(origin_version)) {
LOG(WARNING) << ModelMsg();
Expand Down

0 comments on commit badf912

Please sign in to comment.