maple.cmd.maple_cli

Command-line interface.

This module provides the main CLI application for interacting with MAPLE (Model and Policy Learning Evaluation). It offers commands for managing policies, environments, running evaluations, and controlling the daemon.

Key features: - Policy and environment management (pull, serve, list) - Single episode execution with real-time feedback - Batch evaluation across multiple tasks and seeds - Daemon control and status monitoring - Configuration management - Multiple output formats (JSON, Markdown, CSV) - Progress tracking with rich console output

The CLI is built with Typer and Rich for a modern command-line experience with helpful error messages, progress indicators, and formatted output.

Commands: - pull: Download policies and environments - serve: Start containers for policies/environments - list: List available resources - env: Environment-specific operations - policy: Policy-specific operations - config: Configuration management - run: Execute a single episode - eval: Run batch evaluations - status: Check daemon status - stop: Stop the daemon

Functions

eval_cmd(policy_id, env_id, backend, tasks, ...)

Run batch evaluation across multiple tasks and seeds.

main()

Entry point for the MAPLE CLI application.

main_callback(verbose, log_file, config_file)

Global callback for CLI initialization.

run(policy_id, env_id, task, instruction, ...)

Run a policy on an environment task.

status(port)

Check MAPLE daemon status.

stop(port)

Stop the MAPLE daemon.