Ple Table#
-
class PleTable#
Immutable embedding row layout. Opening validates metadata, not payload digests.
Public Types
Public Functions
-
RowLocation locate(int64_t row) const#
Translate a valid global row into an exact file range without reading payload bytes.
-
inline int64_t rowCount() const noexcept#
-
inline int64_t rowWidth() const noexcept#
-
inline int64_t rowBytes() const noexcept#
-
inline int64_t sourceRowBytes() const noexcept#
-
inline double sourceScale() const noexcept#
-
inline double scale() const noexcept#
-
inline std::string const &tableId() const noexcept#
-
inline std::vector<Shard> const &shards() const noexcept#
Public Static Functions
- static PleTable fromSource(
- Source const &source,
- int64_t rowCount,
- int64_t rowWidth,
- std::filesystem::path const &checkpointDir,
- std::filesystem::path const &dataFile = {},
- DType poolDtype = DType::kFP16,
- double poolScale = 1.0
Original checkpoint tensor contract. An explicit location describes indexed PyTorch payloads. A table split across tensors sets
shardsinstead oftensorKey, in row order. struct Source { std::string tensorKey; DType dtype{DType::kFP16}; int64_t bytes{}; double scale{1.0}; std::vector<Sample> samples; std::filesystem::path file; int64_t offset{}; std::vector<ShardSource> shards; };struct Shard { std::filesystem::path path; int64_t rowBegin{}; int64_t rowCount{}; int64_t byteOffset{}; int64_t byteLength{}; };
struct RowLocation { size_t shardIndex{}; int64_t byteOffset{}; };
! Expected identity and scale come from the engine’s bound artifact metadata. static PleTable open(std::filesystem::path const& manifest, std::string const& expectedTableId, double expectedScale, std::filesystem::path const& dataFile = {});
! Resolve the source tensors from a checkpoint or explicit file and validate their metadata and ! bounded samples.
poolDtype/poolScaledescribe the rows the pool will hold, which differ from the source when the fill converts; the defaults are the cast-to-F16 contract.
-
struct Sample#
-
RowLocation locate(int64_t row) const#
-
struct Sample
Public Members
-
int64_t offset = {}
-
std::string data
-
int64_t offset = {}