From c52cd720384aa7961c2b6c929389035c0274869d Mon Sep 17 00:00:00 2001 From: Bruno Magalhaes Date: Sat, 8 Feb 2025 12:54:48 +0000 Subject: [PATCH] cleanup after example --- .../data_sampling/variable_batch_size_and_lr_example.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deepspeed/runtime/data_pipeline/data_sampling/variable_batch_size_and_lr_example.py b/deepspeed/runtime/data_pipeline/data_sampling/variable_batch_size_and_lr_example.py index 9b791554e6c6..de060521deb3 100644 --- a/deepspeed/runtime/data_pipeline/data_sampling/variable_batch_size_and_lr_example.py +++ b/deepspeed/runtime/data_pipeline/data_sampling/variable_batch_size_and_lr_example.py @@ -125,8 +125,8 @@ def to_layers(self): "pin_memory": False, "dynamic_batching": { "enabled": True, - # Path to load the sequence lengths from, as {metrics_path}/seqlen/seqlen_sample_to_metric.bin and *.idx - # If these 2 files dont exist, they'll be output there on the first run, and loaded on subsequent runs. + # Files to load the sequence lengths from: {metrics_path}/seqlen/seqlen_sample_to_metric.bin and *.idx + # If files dont exist, they'll be computed and saved on the first run, and loaded on subsequent runs. "metrics_path": "./curriculum_output/", "lr_scaling_method": "linear", "min_batch_size": 1, @@ -176,3 +176,5 @@ def to_layers(self): if engine.data_parallel_group.rank() == 0: print(f"epoch {epoch}, batch {batch_id}, loss {loss.item()}, LRs {lr_scheduler.get_lr()}") + dist.barrier() + dist.destroy_process_group()