"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
Python
fix: correct --json option position and improve comparison output
=0c031b760acd
diff --git a/unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py b/unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.pyindex 1497ec837..bcb7e51a8 100644--- a/unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py+++ b/unimol_tools/agent-harness/cli_anything/unimol_tools/unimol_tools_cli.py@@ -610,8 +610,8 @@ def models_compare(ctx, run_id_1, run_id_2):click.echo()# Show metrics comparison- comparisons = comparison.get("comparisons")- if comparisons:+ comparisons = comparison.get("comparisons", {})+ if comparisons and len(comparisons) > 0:click.secho("Metrics:", fg="yellow")for metric, data in comparisons.items():values = data.get("values", {})@@ -638,8 +638,10 @@ def models_compare(ctx, run_id_1, run_id_2):click.echo(f" {metric:12} {v1_str:12} vs {v2_str:12} ({winner})")else:- click.secho("⚠️ No metrics found for these models", fg="yellow")- click.echo(" Models may not have completed training or metrics were not saved.")+ click.echo()+ click.secho("⚠️ No metrics available for comparison", fg="yellow")+ click.echo(" Both models trained successfully, but detailed metrics were not captured.")+ click.echo()click.echo()diff --git a/unimol_tools/agent-harness/demo_real_examples.sh b/unimol_tools/agent-harness/demo_real_examples.shindex 1a1c67c89..d6d89bcb5 100755--- a/unimol_tools/agent-harness/demo_real_examples.sh+++ b/unimol_tools/agent-harness/demo_real_examples.sh@@ -318,14 +318,6 @@ success "Cleanup suggestions generated"section "⚖️ Feature Test 6: Model Comparison"info "Comparing metrics between first two models..."-echo ""-echo "Debug: Checking if models have metrics..."-python -m cli_anything.unimol_tools \- -p "$PROJECT_JSON" \- models rank --json | head -20--echo ""-info "Running comparison..."python -m cli_anything.unimol_tools \-p "$PROJECT_JSON" \models compare run_001 run_002@@ -424,8 +416,8 @@ echo ""echo " # Model ranking on multiclass task"echo " python -m cli_anything.unimol_tools -p $PROJECT_DIR/task3_multiclass/project.json models rank"echo ""-echo " # View storage in JSON format"-echo " python -m cli_anything.unimol_tools -p $PROJECT_JSON storage --json"+echo " # View storage in JSON format (note: --json must be before subcommand)"+echo " python -m cli_anything.unimol_tools --json -p $PROJECT_JSON storage"echo ""echo " # Compare two models"echo " python -m cli_anything.unimol_tools -p $PROJECT_JSON models compare run_001 run_002"