marlax.tracers.Tracer#
- class marlax.tracers.Tracer(log_path)[source]#
Bases:
objectRecords and manages simulation logs and agent exports.
- log_path#
Base directory for log storage.
- Type:
str
- logger_active#
Flag indicating logging activity.
- Type:
bool
- log_buffer#
Buffered rows awaiting flush.
- Type:
list
- flush_every#
Number of frames before auto-flush.
- Type:
int
- regime_idx#
Identifier for current regime.
- Type:
int
- log_filename#
Path to the active Parquet file.
- Type:
str
- parquet_writer#
Writer for Parquet output.
- Type:
pq.ParquetWriter
- __init__(log_path)[source]#
Initialize the tracer.
- Parameters:
log_path (str) β Path to the log directory.
Methods
__init__(log_path)Initialize the tracer.
export_agents(env)Serialize each agent's Q-table to individual pickle files.
import_agents(agent)Load agent Q-tables from pickle files and reinstantiate agents.