Skip to content

Commit fe49431

Browse files
fix path for sagemaker_training_launcher_dir (#57)
* fix path for sagemaker_launcher_dir * modify data files for sagemaker hyperpod recipes
1 parent 26d4d38 commit fe49431

File tree

2 files changed

+6
-31
lines changed

2 files changed

+6
-31
lines changed

setup.py

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,22 @@
3030
# Declare your non-python data files:
3131
# Files underneath configuration/ will be copied into the build preserving the
3232
# subdirectory structure if they exist.
33-
examples = []
33+
sagemaker_hyperpod_recipes = []
3434
for root, dirs, files in os.walk(
35-
"src/hyperpod_cli/custom_launcher/examples/custom_script"
35+
"src/hyperpod_cli/sagemaker_hyperpod_recipes"
3636
):
37-
examples.append(
38-
(
39-
os.path.relpath(root, "examples/custom_script"),
40-
[os.path.join(root, f) for f in files],
41-
)
42-
)
43-
44-
k8s_templates = []
45-
for root, dirs, files in os.walk(
46-
"src/hyperpod_cli/custom_launcher/launcher/nemo/k8s_templates"
47-
):
48-
k8s_templates.append(
49-
(
50-
os.path.relpath(
51-
root,
52-
"src/hyperpod_cli/custom_launcher/launcher/nemo/k8s_templates",
53-
),
54-
[os.path.join(root, f) for f in files],
55-
)
56-
)
57-
58-
nemo_framework_launcher = []
59-
for root, dirs, files in os.walk(
60-
"src/hyperpod_cli/custom_launcher/launcher/nemo/nemo_framework_launcher"
61-
):
62-
nemo_framework_launcher.append(
37+
sagemaker_hyperpod_recipes.append(
6338
(
6439
os.path.relpath(
6540
root,
66-
"src/hyperpod_cli/custom_launcher/launcher/nemo/nemo_framework_launcher",
41+
"src/hyperpod_cli/sagemaker_hyperpod_recipes",
6742
),
6843
[os.path.join(root, f) for f in files],
6944
)
7045
)
7146

7247
setup(
73-
data_files=examples + k8s_templates + nemo_framework_launcher,
48+
data_files=sagemaker_hyperpod_recipes,
7449
name="hyperpod",
7550
version="2.0.0",
7651
packages=find_packages(where="src", exclude=("test",)),

src/hyperpod_cli/constants/command_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
HYPERPOD_NAMESPACE_PREFIX = "hyperpod-ns-"
4343
SAGEMAKER_MANAGED_LOCAL_QUEUE_SUFFIX = "-localqueue"
4444
SAGEMAKER_MANAGED_CLUSTER_QUEUE_SUFFIX = "-clusterqueue"
45-
SAGEMAKER_TRAINING_LAUNCHER_DIR = str(Path("./src/hyperpod_cli/sagemaker_hyperpod_recipes").resolve())
45+
SAGEMAKER_TRAINING_LAUNCHER_DIR = str(Path(__file__).parent.parent / "sagemaker_hyperpod_recipes")
4646
NVIDIA_GPU_RESOURCE_LIMIT_KEY = "nvidia.com/gpu"
4747
AVAILABLE_ACCELERATOR_DEVICES_KEY = "AvailableAcceleratorDevices"
4848
TOTAL_ACCELERATOR_DEVICES_KEY = "TotalAcceleratorDevices"

0 commit comments

Comments
 (0)