Skip to content

Commit

Permalink
Apply isort and black reformatting
Browse files Browse the repository at this point in the history
Signed-off-by: dimapihtar <[email protected]>
  • Loading branch information
dimapihtar committed Aug 27, 2024
1 parent a9cc359 commit cedf70c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def search_config(cfg: dict):
:param Optional[str] hydra_args: hydra override arguments in string format.
:return: None
"""

# Read config
nodes = cfg.get("num_nodes")
gpus_per_node = cfg.get("gpus_per_node")
Expand All @@ -57,7 +57,7 @@ def search_config(cfg: dict):
seq_length = cfg.get("seq_length")
log_dir = cfg.get("log_dir")
custom_cfg = None

print(cfg)
print(model_name)
assert model_name in SUPPORTED_MODELS, f"model must be set to one of {SUPPORTED_MODELS}/<model_size>"
Expand Down
9 changes: 7 additions & 2 deletions nemo/collections/llm/tools/auto_configurator/main_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,22 @@ def get_args():
parser.add_argument('--gpus_per_node', required=False, default=8, type=int, help="Number of GPUs per node")
parser.add_argument('--gpu_memory_gb', required=False, default=80, type=int, help="GPU memory size")
parser.add_argument('--max_training_days', required=False, default=2, type=int, help="Path to data file")
parser.add_argument('--max_minutes_per_run', required=False, default=30, type=int, help="Max minutes per job on cluster")
parser.add_argument(
'--max_minutes_per_run', required=False, default=30, type=int, help="Max minutes per job on cluster"
)
parser.add_argument('--model_type', required=True, type=str, help="Model size in billions")
parser.add_argument('--model_size_in_b', required=True, type=int, help="Model size in billions")
parser.add_argument('--vocab_size', required=False, default=32000, type=int, help="Size of tokenizer vocab")
parser.add_argument('--tflops_per_gpu', required=False, default=140, type=int, help="Estimated tflops per GPU")
parser.add_argument('--num_tokens_in_b', required=False, default=300, type=int, help="Number of tokens in dataset in billions")
parser.add_argument(
'--num_tokens_in_b', required=False, default=300, type=int, help="Number of tokens in dataset in billions"
)
parser.add_argument('--seq_length', required=False, default=2048, type=int, help="Model sequence length")
parser.add_argument('--log_dir', required=True, type=str, help="Path to results directory")

return parser.parse_args()


def main():
"""
Main function in the entire pipeline, it reads the config using hydra and calls search_config.
Expand Down

0 comments on commit cedf70c

Please sign in to comment.