struct rgpot::UmaCheckpointProvenance¶
Overview¶
Where the weights of a .pt2 came from, and their digest. More…
#include <UmaProvenance.hpp>
struct UmaCheckpointProvenance {
// fields
std::optional<std::string> source;
std::optional<std::string> path;
std::optional<std::string> hf_repo;
std::optional<std::string> hf_filename;
std::optional<std::string> hf_revision;
std::optional<std::string> sha256;
// methods
bool present() const;
static UmaCheckpointProvenance fromMetadata(const std::unordered_map<std::string, std::string>& meta);
};
Detailed Documentation¶
Where the weights of a .pt2 came from, and their digest.
Built from the package metadata, as UmaContract is. Every field is optional: packages exported before these keys report all of them absent and load as before. scripts/export_uma_aoti.py writes
checkpoint_source:cli(--checkpoint),env(RGPOT_UMA_CHECKPOINT) orhf(downloaded for--model);checkpoint_path: the local file, forcliandenv;checkpoint_hf_repo,checkpoint_hf_filenameandcheckpoint_hf_revision(the 40-digit commit the file was served from), forhf;checkpoint_sha256: SHA-256 of the checkpoint file the exporter loaded, 64 lowercase hexadecimal digits.
The digest names the weights, not the .pt2; the engine ABI’s rgpot_engine_model_digest hashes the package file itself.
Methods¶
bool present() const
True when the package records any of the keys.