Added & fixed some documentation
This commit is contained in:
@@ -41,6 +41,7 @@ from climbingboardgpt.visualization import load_token_metadata, visualize_route_
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
"""Parse generation, scoring, and visualization options."""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Generate ClimbingBoardGPT routes and save route visualizations.",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
@@ -96,6 +97,7 @@ def parse_args() -> argparse.Namespace:
|
||||
|
||||
|
||||
def default_background_for_board(board: str) -> Path | None:
|
||||
"""Return the bundled board image path for a board when it exists."""
|
||||
candidates = {
|
||||
"tb2": REPO_ROOT / "images" / "tb2_board_12x12_composite.png",
|
||||
"kilter": REPO_ROOT / "images" / "kilter-original-16x12_composite.png",
|
||||
@@ -105,6 +107,7 @@ def default_background_for_board(board: str) -> Path | None:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Generate routes, optionally score them, and save images plus a CSV."""
|
||||
args = parse_args()
|
||||
|
||||
board_config = load_board_for_demo(args.board, config_dir=REPO_ROOT / "configs")
|
||||
|
||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Delegate to the generic demo so board-specific wrappers stay tiny.
|
||||
cmd = [
|
||||
sys.executable,
|
||||
str(REPO_ROOT / "scripts" / "demo_generate_and_visualize.py"),
|
||||
|
||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Delegate to the generic demo so board-specific wrappers stay tiny.
|
||||
cmd = [
|
||||
sys.executable,
|
||||
str(REPO_ROOT / "scripts" / "demo_generate_and_visualize.py"),
|
||||
|
||||
@@ -46,6 +46,7 @@ from climbingboardgpt.visualization import load_token_metadata, visualize_route_
|
||||
|
||||
|
||||
def default_background_for_board(board: str) -> Path | None:
|
||||
"""Return the bundled board image path for a board when it exists."""
|
||||
candidates = {
|
||||
"tb2": REPO_ROOT / "images" / "tb2_board_12x12_composite.png",
|
||||
"kilter": REPO_ROOT / "images" / "kilter-original-16x12_composite.png",
|
||||
@@ -55,6 +56,7 @@ def default_background_for_board(board: str) -> Path | None:
|
||||
|
||||
|
||||
def parse_args() -> argparse.Namespace:
|
||||
"""Parse board, frames, model, and optional visualization settings."""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Predict climb grade from board, angle, and frames string.",
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
@@ -99,6 +101,7 @@ def parse_args() -> argparse.Namespace:
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Predict a frames string's grade and optionally save a route overlay."""
|
||||
args = parse_args()
|
||||
|
||||
board_config = load_board_for_demo(args.board, config_dir=REPO_ROOT / "configs")
|
||||
|
||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Delegate to the generic demo so board-specific wrappers stay tiny.
|
||||
cmd = [
|
||||
sys.executable,
|
||||
str(REPO_ROOT / "scripts" / "demo_predict_grade.py"),
|
||||
|
||||
@@ -9,6 +9,7 @@ from pathlib import Path
|
||||
REPO_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Delegate to the generic demo so board-specific wrappers stay tiny.
|
||||
cmd = [
|
||||
sys.executable,
|
||||
str(REPO_ROOT / "scripts" / "demo_predict_grade.py"),
|
||||
|
||||
Reference in New Issue
Block a user