style: apply ruff format to cli.py and test_condor_gpu.py
CI / Lint (ruff check) (push) Successful in 1m1s
CI / Format (ruff format) (push) Successful in 1m9s
CI / Type check (ty) (push) Successful in 1m11s
CI / Tests (push) Successful in 1m56s
CI / Bump version, build & publish wheel (push) Has been skipped

Pre-existing formatting drift, unrelated to any functional change.
This commit is contained in:
2026-07-24 13:17:58 +02:00
parent 3d1fa7979e
commit dde8b367a4
2 changed files with 18 additions and 25 deletions
+12 -24
View File
@@ -543,14 +543,10 @@ def new_run(
conditioning: Annotated[
Optional[Conditioning], typer.Option("--conditioning")
] = None,
router: Annotated[
Optional[bool], typer.Option("--router/--no-router")
] = None,
router: Annotated[Optional[bool], typer.Option("--router/--no-router")] = None,
router_type: Annotated[Optional[str], typer.Option("--router-type")] = None,
n_experts: Annotated[Optional[int], typer.Option("--n-experts")] = None,
router_axis: Annotated[
Optional[list[str]], typer.Option("--router-axis")
] = None,
router_axis: Annotated[Optional[list[str]], typer.Option("--router-axis")] = None,
out: Annotated[
Optional[Path],
typer.Option("--out", "-o", help="Run dir (default: auto from hyperparams)"),
@@ -619,7 +615,9 @@ def new_run(
if cli_router:
cli_model["router"] = cli_router
cfg = gconfig.merge_cli_overrides(gconfig.DEFAULT_CONFIG, config, cli_train, cli_model)
cfg = gconfig.merge_cli_overrides(
gconfig.DEFAULT_CONFIG, config, cli_train, cli_model
)
run_dir = (out or gconfig.default_out_dir(cfg)).resolve()
if not force:
@@ -1460,14 +1458,10 @@ def train_submit(
request_gpus: Annotated[int, typer.Option("--request-gpus")] = 1,
gpu_type: Annotated[
Optional[str],
typer.Option(
"--gpu-type", help='Pin GPU model, e.g. "Tesla V100-PCIE-32GB"'
),
typer.Option("--gpu-type", help='Pin GPU model, e.g. "Tesla V100-PCIE-32GB"'),
] = None,
gpu_memory_mb: Annotated[Optional[int], typer.Option("--gpu-memory-mb")] = None,
request_memory: Annotated[
int, typer.Option("--request-memory", help="MB")
] = 16384,
request_memory: Annotated[int, typer.Option("--request-memory", help="MB")] = 16384,
request_walltime: Annotated[
int, typer.Option("--request-walltime", help="Seconds (default: 2 days)")
] = 172800,
@@ -1615,7 +1609,8 @@ def rollout_submit(
),
] = 10,
weights: Annotated[
Weights, typer.Option("--weights", help="raw or ema (see `giant rollout --help`)")
Weights,
typer.Option("--weights", help="raw or ema (see `giant rollout --help`)"),
] = Weights.raw,
batch_size: Annotated[
int, typer.Option("--batch-size", "-b", help="Tracks stepped per model forward")
@@ -1647,14 +1642,10 @@ def rollout_submit(
request_gpus: Annotated[int, typer.Option("--request-gpus")] = 1,
gpu_type: Annotated[
Optional[str],
typer.Option(
"--gpu-type", help='Pin GPU model, e.g. "Tesla V100-PCIE-32GB"'
),
typer.Option("--gpu-type", help='Pin GPU model, e.g. "Tesla V100-PCIE-32GB"'),
] = None,
gpu_memory_mb: Annotated[Optional[int], typer.Option("--gpu-memory-mb")] = None,
request_memory: Annotated[
int, typer.Option("--request-memory", help="MB")
] = 16384,
request_memory: Annotated[int, typer.Option("--request-memory", help="MB")] = 16384,
request_walltime: Annotated[
int, typer.Option("--request-walltime", help="Seconds (default: 2 days)")
] = 172800,
@@ -1722,10 +1713,7 @@ def rollout_submit(
command = f"uv run giant rollout {q(str(data_path))} " + " ".join(flags)
wrapper_body = (
"#!/bin/bash\n"
"set -euo pipefail\n"
f"cd {q(str(repo_path))}\n"
f"exec {command}\n"
f"#!/bin/bash\nset -euo pipefail\ncd {q(str(repo_path))}\nexec {command}\n"
)
submit_cfg = GpuSubmitConfig(
+6 -1
View File
@@ -8,7 +8,12 @@ from typer.testing import CliRunner
from giant import config as gconfig
from giant.cli import app
from giant.condor import CondorJobMeta, GpuSubmitConfig, parse_cluster_id, write_gpu_submit
from giant.condor import (
CondorJobMeta,
GpuSubmitConfig,
parse_cluster_id,
write_gpu_submit,
)
runner = CliRunner()