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 oom observer callback #932

Merged
merged 6 commits into from
Feb 27, 2024
Merged
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: 5 additions & 2 deletions llmfoundry/utils/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
import torch
from composer import algorithms
from composer.callbacks import (EarlyStopper, Generate, LRMonitor,
MemoryMonitor, MemorySnapshot, OptimizerMonitor,
RuntimeEstimator, SpeedMonitor)
MemoryMonitor, MemorySnapshot, OOMObserver,
OptimizerMonitor, RuntimeEstimator,
SpeedMonitor)
from composer.core import Algorithm, Callback, Evaluator
from composer.datasets.in_context_learning_evaluation import \
get_icl_task_dataloader
Expand Down Expand Up @@ -165,6 +166,8 @@ def build_callback(
return LRMonitor()
elif name == 'memory_monitor':
return MemoryMonitor()
elif name == 'oom_observer':
return OOMObserver(**kwargs)
elif name == 'memory_snapshot':
return MemorySnapshot(**kwargs)
elif name == 'speed_monitor':
Expand Down
Loading