Bardo.Examples.ExamplesHelper (Bardo v0.1.0)

View Source

Helper module for running Bardo examples more reliably.

This module provides utility functions for running and testing the complex examples in the Bardo framework. It ensures that experiments are properly set up, tracked, and provides better visibility into the progress of running experiments.

Summary

Functions

Run an experiment with progress tracking and error handling.

Run a visualization for a completed experiment.

Functions

run_experiment(config, opts \\ [])

Run an experiment with progress tracking and error handling.

This function sets up and runs an experiment with the given configuration, while providing regular progress updates. It ensures that experiments can be properly tracked and visualized later.

Parameters

  • config: The complete experiment configuration
  • opts: Optional parameters
    • timeout: Maximum time to wait for experiment completion (default: 300_000ms / 5 minutes)
    • update_interval: How often to check/report progress (default: 5_000ms / 5 seconds)
    • visualize: Whether to run visualization after completion (default: false)

Returns

  • - If the experiment completed successfully
  • - If there was an error during setup or execution

run_visualization(config)

Run a visualization for a completed experiment.

Creates a simplified visualization environment based on the experiment configuration.