Spaces:
Running on L40S
Running on L40S
File size: 1,015 Bytes
9f818c5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #!/usr/bin/env python
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: OpenMDW-1.1
"""Print read-only Action Viz checkpoint resolution diagnostics."""
from __future__ import annotations
import argparse
import json
import sys
from pathlib import Path
def _repo_root() -> Path:
return Path(__file__).resolve().parents[1]
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("checkpoint", nargs="?", default=None)
args = parser.parse_args(argv)
framework_root = _repo_root() / "cosmos-framework"
if str(framework_root) not in sys.path:
sys.path.insert(0, str(framework_root))
from cosmos_framework.data.vfm.action.action_viz.local_worker import checkpoint_diagnostic
print(json.dumps(checkpoint_diagnostic(args.checkpoint), indent=2, sort_keys=True))
return 0
if __name__ == "__main__":
raise SystemExit(main())
|