Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
DEMO
Loading...
Searching...
No Matches
signet::forge::InferenceLogReader Class Reference

Reads ML inference log Parquet files and verifies hash chain integrity. More...

#include <inference_log.hpp>

Public Member Functions

expected< std::vector< InferenceRecord > > read_all () const
 Get all inference records from the file.
 
expected< AuditMetadataaudit_metadata () const
 Get the audit chain metadata from the Parquet file's key-value metadata.
 
AuditChainVerifier::VerificationResult verify_chain () const
 Verify the hash chain integrity by re-hashing each record and checking chain continuity.
 
const Schemaschema () const
 Get the schema of the inference log file.
 
int64_t num_records () const
 Number of records in the file.
 
Move-only semantics
 InferenceLogReader ()=default
 
 InferenceLogReader (const InferenceLogReader &)=delete
 
InferenceLogReaderoperator= (const InferenceLogReader &)=delete
 
 InferenceLogReader (InferenceLogReader &&)=default
 
InferenceLogReaderoperator= (InferenceLogReader &&)=default
 

Static Public Member Functions

static expected< InferenceLogReaderopen (const std::string &path)
 Open an inference log Parquet file and pre-load all column data.
 

Detailed Description

Reads ML inference log Parquet files and verifies hash chain integrity.

Usage: auto reader = InferenceLogReader::open("inference_log_abc123_0_999.parquet"); auto records = reader->read_all(); auto verify = reader->verify_chain(); if (!verify.valid) { /* tampered! *‍/ }

Definition at line 728 of file inference_log.hpp.

Constructor & Destructor Documentation

◆ InferenceLogReader() [1/3]

signet::forge::InferenceLogReader::InferenceLogReader ( )
default

◆ InferenceLogReader() [2/3]

signet::forge::InferenceLogReader::InferenceLogReader ( const InferenceLogReader )
delete

◆ InferenceLogReader() [3/3]

signet::forge::InferenceLogReader::InferenceLogReader ( InferenceLogReader &&  )
default

Member Function Documentation

◆ audit_metadata()

expected< AuditMetadata > signet::forge::InferenceLogReader::audit_metadata ( ) const
inline

Get the audit chain metadata from the Parquet file's key-value metadata.

Returns
The AuditMetadata extracted from signetstack.audit.* keys.

Definition at line 800 of file inference_log.hpp.

◆ num_records()

int64_t signet::forge::InferenceLogReader::num_records ( ) const
inline

Number of records in the file.

Definition at line 903 of file inference_log.hpp.

◆ open()

static expected< InferenceLogReader > signet::forge::InferenceLogReader::open ( const std::string &  path)
inlinestatic

Open an inference log Parquet file and pre-load all column data.

Parameters
pathPath to the inference log Parquet file.
Returns
The reader, or an error if the file cannot be opened or parsed.

Definition at line 734 of file inference_log.hpp.

◆ operator=() [1/2]

InferenceLogReader & signet::forge::InferenceLogReader::operator= ( const InferenceLogReader )
delete

◆ operator=() [2/2]

InferenceLogReader & signet::forge::InferenceLogReader::operator= ( InferenceLogReader &&  )
default

◆ read_all()

expected< std::vector< InferenceRecord > > signet::forge::InferenceLogReader::read_all ( ) const
inline

Get all inference records from the file.

Returns
A vector of InferenceRecord objects reconstructed from all row groups.

Definition at line 764 of file inference_log.hpp.

◆ schema()

const Schema & signet::forge::InferenceLogReader::schema ( ) const
inline

Get the schema of the inference log file.

Definition at line 898 of file inference_log.hpp.

◆ verify_chain()

AuditChainVerifier::VerificationResult signet::forge::InferenceLogReader::verify_chain ( ) const
inline

Verify the hash chain integrity by re-hashing each record and checking chain continuity.

Reconstructs hash chain entries from stored columns, recomputes data_hash from the record fields, and runs the full AuditChainVerifier pipeline.

Returns
A VerificationResult indicating whether the chain is valid and, if not, which entry failed verification.
See also
AuditChainVerifier::verify

Definition at line 829 of file inference_log.hpp.


The documentation for this class was generated from the following file: