I was trying to run a high-level backtest and saw some output in the terminal. Most of it was formatted fine except for one block of text. Node.py is printing my configs unformatted when I misconfigured something in my backtest. This makes it harder to read error output and debug my backtests. This seems to be coming from lines 129-142 of Node.py:
for config in self._configs:
try:
result = self._run(
run_config_id=config.id,
engine_config=config.engine,
venue_configs=config.venues,
data_configs=config.data,
batch_size_bytes=config.batch_size_bytes,
)
results.append(result)
except Exception as e:
# Broad catch all prevents a single backtest run from halting
# the execution of the other backtests (such as a zero balance exception).
print(f"Error running {config}: {e}")
I tried formatting the output on my end using various try/except statements, but none improved it.
Feature Request
Code reference: https://github.com/nautechsystems/nautilus_trader/blob/master/nautilus_trader/backtest/node.py
I was trying to run a high-level backtest and saw some output in the terminal. Most of it was formatted fine except for one block of text. Node.py is printing my configs unformatted when I misconfigured something in my backtest. This makes it harder to read error output and debug my backtests. This seems to be coming from lines 129-142 of Node.py:
I tried formatting the output on my end using various try/except statements, but none improved it.