adds debug options to dump onnx graphs #1789
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds functionality to dump onnx graphs via input arguments to ORTTrainer. This will assist in easier debugging processes for developers running into ONNX Runtime errors. [docs]
Test Machine: 8xV100, cu118, python3.10
Test Environment:
Test Command:
torchrun --nproc_per_node 8 optimum/examples/onnxruntime/training/language-modelling/run_clm.py --model_name_or_path mistralai/Mistral-7B-v0.1 --dataset_name wikitext --dataset_config_name wikitext-2-raw-v1 --per_device_train_batch_size 4 --per_device_eval_batch_size 4 --do_train --max_steps 10 --fp16 --output_dir output_dir --overwrite_output_dir --seed 30 --dataloader_num_workers 1 --block_size 512 --deepspeed zero2.json --save_onnx True --onnx_prefix test --log_level VERBOSE
zero2.json