Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
3 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
 
#pragma once
 
namespace onnxruntime {
 
// The versions below highlight the checkpoint format version history.
// Everytime the checkpoint format changes, the version should be incremented
// and the changes should be documented here and in the
// onnxruntime/core/flatbuffers/schema/README.md file.
// Version 1: Introduces the On-Device Training Checkpoint format
//            The format includes support for the ModuleState (stores the module parameters), OptimizerGroups
//            (stores the optimizer states), and PropertyBag
//            (stores custom user properties with support for int64, float and strings).
// Version 2: Introduces the On-Device Training nominal checkpoint state.
//             Changes include the addition of the is_nominal_state field in the checkpoint's ModuleState.
constexpr const int kCheckpointVersion = 2;
 
/**
 * @brief Check if the given checkpoint version is supported in this build
 * @param checkpoint_version The checkpoint version to check
 * @return true if the checkpoint version is supported, false otherwise
 */
inline constexpr bool IsCheckpointVersionSupported(const int checkpoint_version) {
  return kCheckpointVersion == checkpoint_version;
}
 
}  // namespace onnxruntime