Update train.py

pull/545/head
Season 2024-01-06 23:03:19 +08:00 committed by GitHub
parent f8eaf618af
commit f5e65c0f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -192,10 +192,9 @@ def main(args):
# transfer the train data loader into train data iterator
train_iter = iter(train_dl)
# close automatic garbage collection
gc.disable()
with initialize_llm_profile(profiling=args.profiling, start_time=current_time) as prof:
# close automatic garbage collection
gc.disable()
# start iterating the train data and begin training
for batch_count in range(train_state.batch_count, total_steps):
empty_cache_and_diag(batch_count, interval=gpc.config.data.empty_cache_and_diag_interval)