Skip to content

Commit 8d7a9f7

Browse files
committed
Expose ART Megatron installer for downstream workers
1 parent 20dd6a5 commit 8d7a9f7

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ packages = ["src/art", "src/mp_actors"]
9292

9393
[tool.hatch.build.targets.wheel.force-include]
9494
".agents/skills" = "art/skills"
95+
"src/art_megatron_install.py" = "art_megatron_install.py"
9596

9697
[tool.hatch.build]
9798
sources = ["src"]

src/art_megatron_install.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from __future__ import annotations
22

33
import argparse
4-
import importlib.metadata as metadata
4+
from dataclasses import dataclass
5+
from importlib import metadata
56
import json
67
import os
78
import shutil
89
import subprocess
9-
from dataclasses import dataclass
1010
from urllib.parse import parse_qs
1111

1212
from packaging.requirements import Requirement
@@ -62,17 +62,15 @@ def _megatron_requirements() -> dict[str, Requirement]:
6262

6363

6464
def _format_requirement(requirement: Requirement) -> str:
65-
extras = (
66-
f"[{','.join(sorted(requirement.extras))}]"
67-
if requirement.extras
68-
else ""
69-
)
65+
extras = f"[{','.join(sorted(requirement.extras))}]" if requirement.extras else ""
7066
if requirement.url is not None:
7167
return f"{requirement.name}{extras} @ {requirement.url}"
7268
return f"{requirement.name}{extras}{requirement.specifier}"
7369

7470

75-
def _run(command: list[str], *, env: dict[str, str] | None = None, dry_run: bool) -> None:
71+
def _run(
72+
command: list[str], *, env: dict[str, str] | None = None, dry_run: bool
73+
) -> None:
7674
print("+", " ".join(command))
7775
if dry_run:
7876
return

0 commit comments

Comments
 (0)