Skip to content
Open
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
76 changes: 76 additions & 0 deletions .github/workflows/cicd-main.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# 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.
name: CICD NeMo
on:
pull_request:
branches:
- main
- dev
- r**

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.event.label.name || 'main' }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
pre-flight:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.64.2

lint-check:
name: Lint check
runs-on: ubuntu-latest
needs: [pre-flight]
if: |
(
needs.pre-flight.outputs.is_deployment_workflow == 'false'
&& needs.pre-flight.outputs.is_ci_workload == 'true'
) || (
needs.pre-flight.outputs.is_deployment_workflow == 'false'
&& needs.pre-flight.outputs.is_ci_workload == 'false'
&& needs.pre-flight.outputs.docs_only == 'false'
)
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Check lint
run: |
pip install pre-commit==3.6.0
pre-commit install
pre-commit run --all-files --show-diff-on-failure --color=always

cicd-unit-tests:
if: |
(
success()
|| needs.pre-flight.outputs.is_ci_workload == 'true'
|| needs.pre-flight.outputs.force_run_all == 'true'
)
&& !cancelled()
needs: [pre-flight]
runs-on: ubuntu-latest
name: Launch_Unit_Tests
environment: nemo-ci
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.5"

- name: Run tests
run: |
uv run --all-extras pytest --cov=src/nemotron tests
60 changes: 60 additions & 0 deletions .github/workflows/copyright-check.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 2025, NVIDIA CORPORATION.
#
# 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.

name: Copyright check

on:
pull_request:
branches:
- main
- dev
- r**

jobs:
pre-flight:
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_cicd_preflight.yml@v0.64.2

copyright-check:
needs: [pre-flight]
if: |
!(needs.pre-flight.outputs.docs_only == 'true'
|| needs.pre-flight.outputs.is_deployment_workflow == 'true')
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/_copyright_check.yml@v0.2.0
with:
paths: src tests

copyright-check-summary:
needs: [pre-flight, copyright-check]
if: |
(
needs.pre-flight.outputs.docs_only == 'true'
|| needs.pre-flight.outputs.is_deployment_workflow == 'true'
|| always()
)
&& !cancelled()
runs-on: ubuntu-latest
steps:
- name: Result
run: |
FAILED_JOBS=$(gh run view $GITHUB_RUN_ID --json jobs --jq '[.jobs[] | select(.status == "completed" and .conclusion != "success")] | length') || echo 0

if [ "${FAILED_JOBS:-0}" -eq 0 ] || [ "$SKIPPING_IS_ALLOWED" == "true" ]; then
echo "✅ All previous jobs completed successfully"
exit 0
else
echo "❌ Found $FAILED_JOBS failed job(s)"
# Show which jobs failed
gh run view $GITHUB_RUN_ID --json jobs --jq '.jobs[] | select(.status == "completed" and .conclusion != "success") | .name'
exit 1
fi
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ htmlcov/

# Jupyter
.ipynb_checkpoints/
*.ipynb

# mypy
.mypy_cache/
Expand All @@ -59,13 +60,24 @@ dmypy.json
# Environment
.env
.env.local
env.toml
conductor.json

# Project specific
output/
outputs/
logs/
checkpoints/
data/
!src/nemotron/cli/nano3/data/
workspace/
wandb/
.nemotron/
.conductor/

# Claude Code
CLAUDE.md
.claude/

# Compiled config
config.yaml
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
# only include python files
files: \.py$
- id: trailing-whitespace
# only include python files
files: \.py$

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.9" # Use the appropriate version
hooks:
- id: ruff
args: ["--fix"]
- id: ruff
args: ["check", "--select", "I", "--fix"]
- id: ruff-format

- repo: local
hooks:
- id: no-underscore-md
name: "Disallow '_' in Markdown filenames"
language: system
entry: |
bash -c '
# Report the offending files
echo "[pre-commit] ERROR: Found Markdown files with underscores:" >&2
for file in "$@"; do
echo " - $file (use hyphens instead)" >&2
done
exit 1
'
files: '.*\/[^\/]*_[^\/]*\.md$'
exclude: '^\.github/'
types: [file]
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
8 changes: 3 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Unix piping support between pipeline steps
- Atomic file writes for artifact metadata
- WandbTracker for optional W&B integration
- CLI generation with tyro
- CLI generation with typer and OmegaConf

#### Training Recipe Structure
- Recipe package structure at `src/nemotron/recipes/`
Expand All @@ -41,9 +41,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- NVIDIA AI stack integration details (Curator, Megatron-Bridge, Automodel, NeMo-RL, Evaluator)
- Recipe overview with paper links
- Usage examples and quick start
- Training recipe documentation:
- `docs/training/run-recipe.md` - Guide for running recipes
- `docs/training/add-recipe.md` - Guide for contributing recipes
- Recipe-specific READMEs with detailed TODO lists
- Contribution guidelines inspired by NVIDIA-NeMo/Megatron-Bridge

Expand All @@ -56,7 +53,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

**Dependencies:**
- pydantic >= 2.0.0
- tyro >= 0.8.0
- typer >= 0.12.0
- omegaconf >= 2.3.0
- rich >= 13.0.0
- wandb (optional)

Expand Down
Loading