edge case
This commit is contained in:
parent
c0b25541e3
commit
e7da1eb90d
|
@ -39,16 +39,17 @@ class Engine(DeepSpeedEngine):
|
||||||
kwargs['config'] = cfg.trainer.deepspeed.ds_cfg
|
kwargs['config'] = cfg.trainer.deepspeed.ds_cfg
|
||||||
kwargs['config_class'] = DeepSpeedConfig(kwargs['config'])
|
kwargs['config_class'] = DeepSpeedConfig(kwargs['config'])
|
||||||
|
|
||||||
if "stats" in kwargs:
|
stats = {
|
||||||
# stats COULD be = None
|
"global_steps": 0,
|
||||||
stats = kwargs.pop('stats')
|
"micro_steps": 0,
|
||||||
if stats is None:
|
"global_samples": 0,
|
||||||
stats = {
|
"tokens_processed": 0,
|
||||||
"global_steps": 0,
|
}
|
||||||
"micro_steps": 0,
|
|
||||||
"global_samples": 0,
|
# kwargs['stats'] = None will return None when popped
|
||||||
"tokens_processed": 0,
|
maybe_stats = kwargs.pop('stats', stats)
|
||||||
}
|
if maybe_stats is not None:
|
||||||
|
stats = maybe_stats
|
||||||
|
|
||||||
super().__init__(None, *args, **kwargs)
|
super().__init__(None, *args, **kwargs)
|
||||||
self._frozen_params = set()
|
self._frozen_params = set()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user