.. index:: pair: struct; rgpot::UmaCheckpointProvenance .. _doxid-structrgpot_1_1_uma_checkpoint_provenance: struct rgpot::UmaCheckpointProvenance ===================================== .. toctree:: :hidden: Overview ~~~~~~~~ Where the weights of a ``.pt2`` came from, and their digest. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct UmaCheckpointProvenance { // fields std::optional :target:`source`; std::optional :target:`path`; std::optional :target:`hf_repo`; std::optional :target:`hf_filename`; std::optional :target:`hf_revision`; std::optional :target:`sha256`; // methods bool :ref:`present`() const; static UmaCheckpointProvenance :target:`fromMetadata`(const std::unordered_map& meta); }; .. _details-structrgpot_1_1_uma_checkpoint_provenance: 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``) or ``hf`` (downloaded for ``--model``); * ``checkpoint_path`` : the local file, for ``cli`` and ``env``; * ``checkpoint_hf_repo``, ``checkpoint_hf_filename`` and ``checkpoint_hf_revision`` (the 40-digit commit the file was served from), for ``hf``; * ``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 ------- .. index:: pair: function; present .. _doxid-structrgpot_1_1_uma_checkpoint_provenance_1a5397a3d69fe2901036dbf6412cd0953a: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool present() const True when the package records any of the keys.