Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add job description field in toml #101

Merged
merged 1 commit into from
Mar 1, 2024
Merged
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
7 changes: 6 additions & 1 deletion torchtrain/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@ def init_args_from_command_line(
default="./torchtrain/outputs",
help="folder to dump job outputs",
)

parser.add_argument(
"--job.description",
type=str,
default="default job",
help="description of the job",
)
# profiling configs
parser.add_argument(
"--profiling.run_profiler",
Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def main(job_config: JobConfig):
world_size=world_size,
)
world_mesh = parallel_dims.build_mesh(device_type="cuda")

rank0_log(f"Starting job: {job_config.job.description}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps since this is an optional parameter for the run, we should confirm if the entry is there and then display - this way lack of this optional param doesn't break the run?
(i.e.
if 'description' in job_config.job: rank0_log(f"...")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entry will always be there since the config manager populated the default added to argparse.

model_name = job_config.model.name
rank0_log(f"Building {model_name}")
# build tokenizer
Expand Down
1 change: 1 addition & 0 deletions train_configs/debug_model.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TorchTrain Config.toml
[job]
dump_folder = "./outputs"
description = "debug training"

[profiling]
run_profiler = true
Expand Down
1 change: 1 addition & 0 deletions train_configs/llama_7b.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# TorchTrain Config.toml
[job]
dump_folder = "./outputs"
description = "llama 7b training"

[profiling]
run_profiler = true
Expand Down
Loading