Skip to content

Commit 2e15dc5

Browse files
authored
Add initial muon support (#3)
Add muon and tests. Also set everything up. Signed-off-by: Hao Wu <[email protected]>
1 parent 79743b6 commit 2e15dc5

30 files changed

+1311
-42
lines changed

.github/actions/test-template/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ inputs:
3636
image:
3737
description: "Image to use for test"
3838
required: false
39-
default: "llm_shower"
39+
default: "emerging_optimizers"
4040
cpu-only:
4141
description: "Run tests on CPU only"
4242
required: false
@@ -140,7 +140,7 @@ runs:
140140
- name: Checkout repository
141141
uses: actions/checkout@v2
142142
with:
143-
path: LLM-Shower
143+
path: Emerging-Optimizers
144144

145145
- name: Start container
146146
shell: bash
@@ -164,7 +164,7 @@ runs:
164164
--env HYDRA_FULL_ERROR=1 \
165165
--env HF_HOME=/home/TestData/HF_HOME \
166166
--env RUN_ID=${{ github.run_id }} \
167-
--volume $(pwd)/LLM-Shower:/workspace \
167+
--volume $(pwd)/Emerging-Optimizers:/workspace \
168168
--volume $MNT_PATH/TestData:/home/TestData \
169169
nemoci.azurecr.io/${{ inputs.image }}:${{ github.run_id }} \
170170
bash -c "sleep $(( ${{ inputs.timeout }} * 60 + 60))"
@@ -189,7 +189,7 @@ runs:
189189
190190
docker exec -t nemo_container_${{ github.run_id }} bash -c '\
191191
uv pip install --no-deps -e . && \
192-
bash tests/${{ inputs.is_unit_test == 'true' && 'unit_tests' || 'functional_tests' }}/${{ inputs.script }}.sh && \
192+
bash tests/${{ inputs.is_unit_test == 'true' && 'ci' }}/${{ inputs.script }}.sh && \
193193
echo "Finished successfully." || echo "Did not finish."'
194194
) 2>&1 | tee err.log
195195

.github/workflows/_build_container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
run: |
5252
LAST_PRS=$(gh api graphql -f query='
5353
query {
54-
repository(owner: "NVIDIA-NeMo", name: "LLM-Shower") {
54+
repository(owner: "NVIDIA-NeMo", name: "Emerging-Optimizers") {
5555
pullRequests(states: MERGED, first: 100, orderBy: {field: UPDATED_AT, direction: DESC}) {
5656
nodes {
5757
number

.github/workflows/build-test-publish-wheel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
if: ${{ vars.BUILD_TEST_PUBLISH_WHEEL == 'true' }}
3131
with:
3232
dry-run: true
33-
python-package: llm_shower
33+
python-package: emerging_optimizers
3434
python-version: "3.10"
3535
packaging: uv
3636
secrets:

.github/workflows/cicd-main.yml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: ./.github/workflows/_build_container.yml
4343
needs: cicd-wait-in-queue
4444
with:
45-
image-name: llm_shower
45+
image-name: emerging_optimizers
4646
dockerfile: docker/Dockerfile.ci
4747
runner: self-hosted-nemo
4848
secrets:
@@ -55,7 +55,7 @@ jobs:
5555
fail-fast: false
5656
matrix:
5757
include:
58-
- script: L0_Unit_Tests_GPU
58+
- script: L0_Tests_GPU
5959
runner: self-hosted-nemo
6060
timeout: 30
6161
needs: [cicd-container-build]
@@ -72,14 +72,44 @@ jobs:
7272
script: ${{ matrix.script }}
7373
timeout: ${{ matrix.timeout || 10 }}
7474
is_unit_test: "true"
75-
image: llm_shower
75+
image: emerging_optimizers
7676
cpu-only: ${{ matrix.cpu-only || false }}
7777
has-azure-credentials: "true"
7878
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
7979
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
8080
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
8181

82+
cicd-unit-tests-cpu:
83+
strategy:
84+
fail-fast: false
85+
matrix:
86+
include:
87+
- script: L0_Tests_CPU
88+
runner: linux-amd64-cpu16
89+
timeout: 30
90+
needs: [cicd-container-build]
91+
runs-on: ${{ matrix.runner }}
92+
name: ${{ matrix.script }}
93+
environment: nemo-ci
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v4
97+
- name: main
98+
uses: ./.github/actions/test-template
99+
with:
100+
runner: ${{ runner.name }}
101+
script: ${{ matrix.script }}
102+
timeout: ${{ matrix.timeout || 10 }}
103+
is_unit_test: "true"
104+
image: emerging_optimizers
105+
cpu-only: ${{ matrix.cpu-only || true }}
106+
has-azure-credentials: "true"
107+
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
108+
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
109+
azure-subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
110+
82111
cicd-e2e-tests:
112+
if: false
83113
strategy:
84114
fail-fast: false
85115
matrix:
@@ -100,7 +130,7 @@ jobs:
100130
runner: ${{ runner.name }}
101131
script: ${{ matrix.script }}
102132
timeout: ${{ matrix.timeout || 10 }}
103-
image: llm_shower
133+
image: emerging_optimizers
104134
cpu-only: ${{ matrix.cpu-only || false }}
105135
has-azure-credentials: "true"
106136
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}

.github/workflows/release-freeze.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
code-freeze:
3737
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected]
3838
with:
39-
library-name: LLM-Shower
40-
python-package: llm_shower
39+
library-name: Emerging-Optimizers
40+
python-package: emerging_optimizers
4141
release-type: ${{ inputs.release-type }}
4242
freeze-commit: ${{ inputs.freeze-commit }}
4343
dry-run: ${{ inputs.dry-run }}

.github/workflows/release.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
name: "Release LLM-Shower"
14+
name: "Release Emerging-Optimizers"
1515

1616
on:
1717
workflow_dispatch:
@@ -40,8 +40,8 @@ jobs:
4040
uses: NVIDIA-NeMo/FW-CI-templates/.github/workflows/[email protected]
4141
with:
4242
release-ref: ${{ inputs.release-ref }}
43-
python-package: llm_shower
44-
library-name: LLM-Shower
43+
python-package: emerging_optimizers
44+
library-name: Emerging-Optimizers
4545
dry-run: ${{ inputs.dry-run }}
4646
version-bump-branch: ${{ inputs.version-bump-branch }}
4747
create-gh-release: ${{ inputs.create-gh-release }}

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ repos:
3232
args: ["check", "--select", "I", "--fix"]
3333
- id: ruff-format
3434

35+
- repo: https://github.com/pre-commit/mirrors-mypy
36+
rev: v1.14.0
37+
hooks:
38+
- id: mypy
39+
exclude: ^docs|^tests|^benchmarks|^docker
40+
3541
- repo: local
3642
hooks:
3743
- id: no-underscore-md

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing To LLM-Shower
1+
# Contributing To Emerging-Optimizers
22

33
## Signing Your Work
44

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# LLM Shower
1+
# Emerging Optimizers

docker/Dockerfile.ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ ENV PATH="$UV_PROJECT_ENVIRONMENT/bin:$PATH"
2525

2626
WORKDIR /workspace
2727
RUN --mount=type=bind,source=pyproject.toml,target=/workspace/pyproject.toml \
28-
--mount=type=bind,source=llm_shower/__init__.py,target=/workspace/llm_shower/__init__.py \
29-
--mount=type=bind,source=llm_shower/package_info.py,target=/workspace/llm_shower/package_info.py \
28+
--mount=type=bind,source=emerging_optimizers/__init__.py,target=/workspace/emerging_optimizers/__init__.py \
29+
--mount=type=bind,source=emerging_optimizers/package_info.py,target=/workspace/emerging_optimizers/package_info.py \
3030
--mount=type=bind,source=uv.lock,target=/workspace/uv.lock bash -exu <<"EOF"
3131

3232
# Use the container's torch installation rather than reinstall it

0 commit comments

Comments
 (0)