[Deepspeed] Allow HF optimizer and scheduler to be passed to deepspeed (#10464)
* pass hf optimizer and scheduler to deepspeed if not specified in ds config * pass hf optimizer and scheduler to deepspeed if not specified in ds config * update * make init_deepspeed support config dict * fix docstring formatting * clean up trainer's comments * add new tests * fix type * composit argparse doesn't work * style * add a new test, rename others * document new functionality * complete tests, add docs * style * correct level * Apply suggestions from code review Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * add new methods to the doc * must tell DS we are using a non-native optimizer * add protection against cpu_offload + HF optimizer combo * fix the cli overrides * sync docs + tests * restore AdamW * better docs * need new version * no longer needed * remove outdate information * refactor duplicated code Co-authored-by: Stas Bekman <stas@stason.org> Co-authored-by: Stas Bekman <stas00@users.noreply.github.com> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
This commit is contained in:
@@ -491,10 +491,14 @@ def assert_screenout(out, what):
|
||||
class CaptureStd:
|
||||
"""
|
||||
Context manager to capture:
|
||||
stdout, clean it up and make it available via obj.out stderr, and make it available via obj.err
|
||||
|
||||
init arguments: - out - capture stdout: True/False, default True - err - capture stdout: True/False, default
|
||||
True
|
||||
- stdout, clean it up and make it available via obj.out
|
||||
- stderr, and make it available via obj.err
|
||||
|
||||
init arguments:
|
||||
|
||||
- out - capture stdout: True/False, default True
|
||||
- err - capture stdout: True/False, default True
|
||||
|
||||
Examples::
|
||||
|
||||
|
||||
Reference in New Issue
Block a user