Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# CI for NV-Generate-CTMR: lint and format checks via pre-commit
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit
run: pre-commit run --all-files
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,5 @@ cython_debug/
!assets/**/*.png
!assets/**/*.jpg
!assets/**/*.mp4
.github/workflows/

.idea/
14 changes: 14 additions & 0 deletions bin/uv_lock.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@

set -euo pipefail

ensure_uv() {
if command -v uv &>/dev/null; then
return 0
fi
echo "uv not found; installing uv..." >&2
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="${HOME}/.local/bin:${PATH}"
if ! command -v uv &>/dev/null; then
echo "Failed to install uv. Install manually: https://docs.astral.sh/uv/getting-started/installation/" >&2
return 1
fi
}
ensure_uv

for file in "$@"; do
project_dir="$(dirname "$file")"
if ! uv lock --check --project "$project_dir" &>/dev/null; then
Expand Down
14 changes: 14 additions & 0 deletions bin/uv_lock_script.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@

set -euo pipefail

ensure_uv() {
if command -v uv &>/dev/null; then
return 0
fi
echo "uv not found; installing uv..." >&2
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="${HOME}/.local/bin:${PATH}"
if ! command -v uv &>/dev/null; then
echo "Failed to install uv. Install manually: https://docs.astral.sh/uv/getting-started/installation/" >&2
return 1
fi
}
ensure_uv

for file in "$@"; do
if head -n1 "$file" | grep -q '^#!/usr/bin/env -S uv run --script'; then
if ! uv lock --check --script "$file" &>/dev/null; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,12 @@ def build_webdataset(webdataset_instance, **kwargs):
from cosmos_predict2._src.predict2.action.datasets.gr00t_dreams.data.dataset import LeRobotDataset

# Default path for CMR Versius dataset - can be overridden in experiment configs
base_path_cmr_versius = ("/CMR_Versius/cholecystectomy_480p,"
"/CMR_Versius/hysterectomy_480p,"
"/CMR_Versius/inguinal_hernia_480p,"
"/CMR_Versius/prostatectomy_480p")
base_path_cmr_versius = (
"/CMR_Versius/cholecystectomy_480p,"
"/CMR_Versius/hysterectomy_480p,"
"/CMR_Versius/inguinal_hernia_480p,"
"/CMR_Versius/prostatectomy_480p"
)

cmr_versius_train_dataset = L(LeRobotDataset)(
num_frames=13, # 12 prediction frames + 1 reference frame
Expand Down Expand Up @@ -274,8 +276,8 @@ def build_webdataset(webdataset_instance, **kwargs):
# ============================================================================
from cosmos_predict2._src.predict2.action.datasets.gr00t_dreams.data.dataset import MixedLeRobotDataset
from cosmos_predict2._src.predict2.action.datasets.gr00t_dreams.groot_configs import (
OPEN_H_DATASET_SPECS,
MAX_ACTION_DIM,
OPEN_H_DATASET_SPECS,
)

open_h_multi_train_dataset = L(MixedLeRobotDataset)(
Expand Down Expand Up @@ -320,7 +322,11 @@ def build_webdataset(webdataset_instance, **kwargs):
from cosmos_predict2._src.predict2.action.datasets.gr00t_dreams.data.embodiment_tags import EmbodimentTag

SUTUREBOT_DATASET_SPECS: list[dict] = [
{"path": os.environ.get("SUTUREBOT_DATASET_PATH", "/SutureBot"), "embodiment": EmbodimentTag.SUTUREBOT, "mix_ratio": 1.0},
{
"path": os.environ.get("SUTUREBOT_DATASET_PATH", "/SutureBot"),
"embodiment": EmbodimentTag.SUTUREBOT,
"mix_ratio": 1.0,
},
]

suturebot_train_dataset = L(MixedLeRobotDataset)(
Expand Down
Loading