Warning, /AID2E-framework/docs/user-guide/notes/cli.md is written in an unsupported language. File is not indexed.
0001 # CLI and runtime
0002
0003 See the [CLI guide](../cli.md) for commands, options, and output files.
0004
0005 ## CLI structure
0006
0007 ```text
0008 src/aid2e/cli/
0009 ├── __init__.py # Exports the CLI group
0010 ├── aid2e_cli.py # Command registration and plugin loading
0011 ├── _helpers.py # Configuration detection and formatting
0012 ├── config_commands.py # describe, inspect, validate
0013 ├── workflow_commands.py # optimize and planned workflow commands
0014 └── utility_commands.py # list, version and planned utilities
0015 ```
0016
0017 The CLI keeps commands independently testable, with compact output, optional detail, and JSON/YAML for scripting. Plugins use the `aid2e.commands` entrypoint group.
0018
0019 ## Command structure
0020
0021 Commands marked `planned` are not registered or available through the CLI.
0022
0023 ```text
0024 aid2e
0025 ├── Config inspection
0026 │ ├── describe # Configuration summary with automatic type detection
0027 │ ├── inspect # Detailed inspection with section filtering
0028 │ └── validate # Syntax and structure validation
0029 ├── Workflow execution
0030 │ ├── optimize # Run optimization from a full configuration
0031 │ ├── run # Execute a workflow without optimization (planned)
0032 │ ├── resume # Restart from a checkpoint (planned)
0033 │ ├── stop # Halt a running optimization (planned)
0034 │ ├── status # Check progress (planned)
0035 │ └── clean # Remove temporary files (planned)
0036 └── Utilities
0037 ├── list # Available optimizers, templates, and problems
0038 ├── version # Installed framework version
0039 ├── init # Create configurations from templates (planned)
0040 └── graph # Visualize a workflow (planned)
0041 ```
0042
0043 ## Runtime responsibilities
0044
0045 `run_optimization()` schedules trial batches, updates the optimizer, and exports results. `run_trial_workflow()` prepares and executes one trial with its own work/output directories. Both functions live in `src/aid2e/utilities/runtime_builders.py`.
0046
0047 The global scheduler receives `run_trial_workflow` with a configuration path, trial index, and design point. Jobs inside the workflow receive `JobContext`. Scheduler adapters must preserve the submitted callable's argument.
0048
0049 Run records stay in the existing runtime; files are returned by `save_optimization_results()`.