onnxruntime/orttraining/orttraining/python/training
pengwa 6b7bce5ec9
Model post process for zero stage3 training (#17187)
### Model post process for zero stage3 training

This is the last change to make single GPU/Multiple GPUs run pass. 

Design details:
https://microsoft.sharepoint.com/:p:/t/ONNX2/EfNfJ43necpIoPI6x5M2zvYBVbfjoPQmG4Boc_F7-tHm1w?e=ekQwA6&nav=eyJzSWQiOjMxNiwiY0lkIjoxMDE1Nzg3NDZ9

`PyTorch` runs with ZeROOffloadSubscriber:

```
  model = prepare_model(...)
  from onnxruntime.training.utils.hooks import configure_ort_compatible_zero_stage3
  configure_ort_compatible_zero_stage3()
```

`ORTModule` runs with ZeROOffloadSubscriber:

```
  os.environ['ORTMODULE_ENABLE_ZERO_STAGE3'] = '1'
  from onnxruntime.training.ortmodule import ORTModule
  model = ORTModule(self.model)
```

It will be fairly easy to debug convergence issue if both ORT and
PyTorch can run the same offload path.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
2023-09-22 08:54:25 +08:00
..
amp [Better Engineering] Bump ruff to 0.0.278 and fix new lint errors (#16789) 2023-07-21 12:53:41 -07:00
api Copy to buffer for both trainable as well as non trainable parameters (#17070) 2023-08-09 17:23:24 -07:00
experimental Manage ORTModule configurations consistently (#16396) 2023-06-27 19:19:36 +08:00
onnxblock Build gradient graph starting at the loss alone (#17240) 2023-08-23 23:54:45 -07:00
optim [Better Engineering] Bump ruff to 0.0.278 and fix new lint errors (#16789) 2023-07-21 12:53:41 -07:00
ort_triton Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
ortmodule Model post process for zero stage3 training (#17187) 2023-09-22 08:54:25 +08:00
torchdynamo Fix orttraining_test_dort.py (#17034) 2023-08-08 08:11:48 -07:00
utils Model post process for zero stage3 training (#17187) 2023-09-22 08:54:25 +08:00
__init__.py Add mac and windows python packages for onnxruntime-training (#16993) 2023-08-07 20:32:55 -07:00
_checkpoint_storage.py Enable pylint and numpy rules (#15218) 2023-03-27 20:37:53 -07:00
_utils.py [Better Engineering] Bump ruff to 0.0.278 and fix new lint errors (#16789) 2023-07-21 12:53:41 -07:00
artifacts.py add logits option to generate artifacts (#17276) 2023-08-29 16:55:31 -07:00
checkpoint.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
model_desc_validation.py Adopt linrtunner as the linting tool - take 2 (#15085) 2023-03-24 15:29:03 -07:00
orttrainer.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00
orttrainer_options.py [Better Engineering] Bump ruff to 0.0.278 and fix new lint errors (#16789) 2023-07-21 12:53:41 -07:00
postprocess.py Disable PERF* rules in ruff to allow better readability (#16834) 2023-07-25 15:38:22 -07:00