Skip to content

Commit 37b25d8

Browse files
committed
refactor: step information in profiling now part of the config instead of CMD args
1 parent 02e8fdd commit 37b25d8

2 files changed

Lines changed: 0 additions & 47 deletions

File tree

src/modalities/__main__.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -705,52 +705,14 @@ def profile():
705705
required=True,
706706
help="Path to the experiment output directory.",
707707
)
708-
@click.option(
709-
"--num_wait_steps",
710-
type=int,
711-
default=1,
712-
show_default=True,
713-
help="Number of wait steps to skip in profiling.",
714-
)
715-
@click.option(
716-
"--num_warmup_steps",
717-
type=int,
718-
default=1,
719-
show_default=True,
720-
help="Number of warmup steps to skip in profiling. Already recording but dropping the data.",
721-
)
722-
@click.option(
723-
"--num_measurement_steps",
724-
type=int,
725-
default=3,
726-
show_default=True,
727-
help="Number of steps to measure during profiling.",
728-
)
729-
@click.option(
730-
"--profiled_ranks",
731-
type=str,
732-
default="0",
733-
help="Comma-separated list of profiled ranks (must not have spaces), e.g. --profiled_ranks '2,4,8'",
734-
)
735708
def CMD_entry_point_run_train_step_profiler(
736709
config_file_path: Path,
737710
experiment_root_path: Path,
738-
num_wait_steps: int,
739-
num_warmup_steps: int,
740-
num_measurement_steps: int,
741-
profiled_ranks: str,
742711
):
743712
"""Run train step profiler and write result to JSON if RANK=0."""
744-
profiled_ranks_list = [int(i) for i in profiled_ranks.split(",")] if profiled_ranks != "" else [0]
745-
logger.info(f"Running distributed profiling on ranks {profiled_ranks_list}")
746-
747713
ModalitiesProfilerStarter.run_distributed(
748714
config_file_path=config_file_path,
749-
num_measurement_steps=num_measurement_steps,
750-
num_wait_steps=num_wait_steps,
751-
num_warmup_steps=num_warmup_steps,
752715
experiment_root_path=experiment_root_path,
753-
profiled_ranks=profiled_ranks_list,
754716
)
755717

756718

tutorials/profiling/scripts/distributed/run_distributed_model_profiling.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,7 @@
77
config_path = cwd / Path("../../configs/distributed_8B_model_profiling.yaml")
88
experiment_root_path = cwd / Path("../../experiments/")
99

10-
num_measurement_steps = 3
11-
num_wait_steps = 20
12-
num_warmup_steps = 20
13-
profiled_ranks = [0, 1]
14-
1510
ModalitiesProfilerStarter.run_distributed(
1611
config_file_path=config_path,
17-
num_measurement_steps=num_measurement_steps,
18-
num_wait_steps=num_wait_steps,
19-
num_warmup_steps=num_warmup_steps,
2012
experiment_root_path=experiment_root_path,
21-
profiled_ranks=profiled_ranks,
2213
)

0 commit comments

Comments
 (0)