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

[pipeline inference] pipeline inference #4492

Merged
merged 18 commits into from
Aug 30, 2023

Conversation

FoolPlayer
Copy link
Contributor

📌 Checklist before creating the PR

  • I have created an issue for this PR for traceability
  • The title follows the standard format: [doc/gemini/tensor/...]: A concise description
  • I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge

e.g. fixed #1234, closed #1234, resolved #1234

📝 What does this PR do?

Summarize your work here.
if you have any plots/diagrams/screenshots/tables, please attach them here.

💥 Checklist before requesting a review

  • I have linked my PR to an issue (instruction)
  • My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
  • I have performed a self-review of my code
  • I have added thorough tests.
  • I have added docstrings for all the functions/methods I implemented

⭐️ Do you enjoy contributing to Colossal-AI?

  • 🌝 Yes, I do.
  • 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

@github-actions
Copy link
Contributor

The code coverage for the changed files is 79%.

Click me to view the complete report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py                        185     14    92%
colossalai/cluster/process_group_mesh.py                                    73      1    99%
colossalai/pipeline/p2p.py                                                  96      7    93%
colossalai/pipeline/schedule/generate.py                                    78     78     0%
colossalai/pipeline/schedule/interleaved_pp.py                             170     10    94%
colossalai/pipeline/schedule/one_f_one_b.py                                132      4    97%
colossalai/pipeline/stage_manager.py                                        50      0   100%
colossalai/ppinference/__init__.py                                           3      3     0%
colossalai/ppinference/engine.py                                            33     33     0%
colossalai/ppinference/inference_config.py                                  12     12     0%
colossalai/ppinference/microbatch_manager.py                                84     84     0%
colossalai/ppinference/modeling/__init__.py                                  0      0   100%
colossalai/ppinference/modeling/gpt2.py                                    135    135     0%
colossalai/ppinference/test.py                                              23     23     0%
colossalai/ppinference/utils.py                                             15     15     0%
colossalai/shardformer/layer/_operation.py                                 284    130    54%
colossalai/shardformer/layer/linear.py                                     188     53    72%
colossalai/shardformer/layer/qkv_fused_linear.py                           299     75    75%
colossalai/shardformer/modeling/bert.py                                    482    145    70%
colossalai/shardformer/modeling/bloom.py                                   458    141    69%
colossalai/shardformer/modeling/gpt2.py                                    397    122    69%
colossalai/shardformer/modeling/whisper.py                                 319     69    78%
colossalai/shardformer/policies/base_policy.py                              91      7    92%
colossalai/shardformer/policies/bert.py                                    260      0   100%
colossalai/shardformer/policies/blip2.py                                    49      2    96%
colossalai/shardformer/policies/bloom.py                                   154      2    99%
colossalai/shardformer/policies/gpt2.py                                    185      1    99%
colossalai/shardformer/policies/t5.py                                      177      5    97%
colossalai/shardformer/policies/whisper.py                                 196      9    95%
colossalai/shardformer/shard/shard_config.py                                30      0   100%
tests/test_config/test_load_config.py                                        9      0   100%
tests/test_context/test_hybrid_parallel.py                                 105     25    76%
tests/test_data/test_cifar10_dataset.py                                     14      1    93%
tests/test_data/test_data_parallel_sampler.py                               35      1    97%
tests/test_data/test_deterministic_dataloader.py                            34      1    97%
tests/test_pipeline/test_pipeline_utils/test_t5_pipeline_utils.py           17      0   100%
tests/test_pipeline/test_pipeline_utils/test_whisper_pipeline_utils.py      20      2    90%
tests/test_pipeline/test_schedule/test_interleaved.py                       99      1    99%
tests/test_pipeline/test_stage_manager.py                                   45      1    98%
tests/test_shardformer/test_layer/test_gpt2_qkv_fused_linear_1d.py          93      1    99%
tests/test_shardformer/test_layer/test_linear_1d.py                        116      1    99%
tests/test_shardformer/test_model/_utils.py                                160     21    87%
tests/test_shardformer/test_model/test_shard_bert.py                        59      1    98%
tests/test_shardformer/test_model/test_shard_bloom.py                       56      1    98%
tests/test_shardformer/test_model/test_shard_gpt2.py                        58      1    98%
tests/test_shardformer/test_model/test_shard_llama.py                       61      1    98%
tests/test_shardformer/test_model/test_shard_opt.py                         59      1    98%
tests/test_shardformer/test_model/test_shard_t5.py                          60      1    98%
tests/test_shardformer/test_model/test_shard_vit.py                         58      1    98%
tests/test_shardformer/test_model/test_shard_whisper.py                     67      4    94%
tests/test_utils/test_activation_checkpointing.py                           81      1    99%
--------------------------------------------------------------------------------------------
TOTAL                                                                     5964   1247    79%

@github-actions
Copy link
Contributor

The code coverage for the changed files is 79%.

Click me to view the complete report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py                        185     14    92%
colossalai/cluster/process_group_mesh.py                                    73      1    99%
colossalai/pipeline/p2p.py                                                  96      7    93%
colossalai/pipeline/schedule/generate.py                                    80     80     0%
colossalai/pipeline/schedule/interleaved_pp.py                             170     10    94%
colossalai/pipeline/schedule/one_f_one_b.py                                132      4    97%
colossalai/pipeline/stage_manager.py                                        50      0   100%
colossalai/ppinference/__init__.py                                           3      3     0%
colossalai/ppinference/engine.py                                            33     33     0%
colossalai/ppinference/inference_config.py                                  12     12     0%
colossalai/ppinference/microbatch_manager.py                                84     84     0%
colossalai/ppinference/modeling/__init__.py                                  0      0   100%
colossalai/ppinference/modeling/gpt2.py                                    135    135     0%
colossalai/ppinference/test.py                                              23     23     0%
colossalai/ppinference/utils.py                                             15     15     0%
colossalai/shardformer/layer/_operation.py                                 284    130    54%
colossalai/shardformer/layer/linear.py                                     188     53    72%
colossalai/shardformer/layer/qkv_fused_linear.py                           299     75    75%
colossalai/shardformer/modeling/bert.py                                    482    145    70%
colossalai/shardformer/modeling/bloom.py                                   458    141    69%
colossalai/shardformer/modeling/gpt2.py                                    397    122    69%
colossalai/shardformer/modeling/whisper.py                                 319     69    78%
colossalai/shardformer/policies/base_policy.py                              91      7    92%
colossalai/shardformer/policies/bert.py                                    260      0   100%
colossalai/shardformer/policies/blip2.py                                    49      2    96%
colossalai/shardformer/policies/bloom.py                                   154      2    99%
colossalai/shardformer/policies/gpt2.py                                    185      1    99%
colossalai/shardformer/policies/t5.py                                      177      5    97%
colossalai/shardformer/policies/whisper.py                                 196      9    95%
colossalai/shardformer/shard/shard_config.py                                30      0   100%
tests/test_config/test_load_config.py                                        9      0   100%
tests/test_context/test_hybrid_parallel.py                                 105     25    76%
tests/test_data/test_cifar10_dataset.py                                     14      1    93%
tests/test_data/test_data_parallel_sampler.py                               35      1    97%
tests/test_data/test_deterministic_dataloader.py                            34      1    97%
tests/test_pipeline/test_pipeline_utils/test_t5_pipeline_utils.py           17      0   100%
tests/test_pipeline/test_pipeline_utils/test_whisper_pipeline_utils.py      20      2    90%
tests/test_pipeline/test_schedule/test_interleaved.py                       99      1    99%
tests/test_pipeline/test_stage_manager.py                                   45      1    98%
tests/test_shardformer/test_layer/test_gpt2_qkv_fused_linear_1d.py          93      1    99%
tests/test_shardformer/test_layer/test_linear_1d.py                        116      1    99%
tests/test_shardformer/test_model/_utils.py                                160     21    87%
tests/test_shardformer/test_model/test_shard_bert.py                        59      1    98%
tests/test_shardformer/test_model/test_shard_bloom.py                       56      1    98%
tests/test_shardformer/test_model/test_shard_gpt2.py                        58      1    98%
tests/test_shardformer/test_model/test_shard_llama.py                       61      1    98%
tests/test_shardformer/test_model/test_shard_opt.py                         59      1    98%
tests/test_shardformer/test_model/test_shard_t5.py                          60      1    98%
tests/test_shardformer/test_model/test_shard_vit.py                         58      1    98%
tests/test_shardformer/test_model/test_shard_whisper.py                     67      4    94%
tests/test_utils/test_activation_checkpointing.py                           81      1    99%
--------------------------------------------------------------------------------------------
TOTAL                                                                     5966   1249    79%

@github-actions
Copy link
Contributor

The code coverage for the changed files is 84%.

Click me to view the complete report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py                        185     14    92%
colossalai/cluster/process_group_mesh.py                                    73      1    99%
colossalai/inference/__init__.py                                             2      0   100%
colossalai/inference/pipeline/__init__.py                                    2      0   100%
colossalai/inference/pipeline/engine.py                                     34      0   100%
colossalai/inference/pipeline/microbatch_manager.py                         86      3    97%
colossalai/inference/pipeline/modeling/__init__.py                           0      0   100%
colossalai/inference/pipeline/modeling/gpt2.py                             135     50    63%
colossalai/inference/pipeline/policy/gpt2_ppinfer.py                        43      5    88%
colossalai/inference/pipeline/utils.py                                      15     10    33%
colossalai/pipeline/p2p.py                                                  96      7    93%
colossalai/pipeline/schedule/generate.py                                    79      1    99%
colossalai/pipeline/schedule/interleaved_pp.py                             170     10    94%
colossalai/pipeline/schedule/one_f_one_b.py                                132      4    97%
colossalai/pipeline/stage_manager.py                                        50      0   100%
colossalai/shardformer/layer/_operation.py                                 284    130    54%
colossalai/shardformer/layer/linear.py                                     188     53    72%
colossalai/shardformer/layer/qkv_fused_linear.py                           299     75    75%
colossalai/shardformer/modeling/bert.py                                    482    145    70%
colossalai/shardformer/modeling/bloom.py                                   458    141    69%
colossalai/shardformer/modeling/gpt2.py                                    397    122    69%
colossalai/shardformer/modeling/whisper.py                                 319     69    78%
colossalai/shardformer/policies/base_policy.py                              91      7    92%
colossalai/shardformer/policies/bert.py                                    260      0   100%
colossalai/shardformer/policies/blip2.py                                    49      2    96%
colossalai/shardformer/policies/bloom.py                                   154      2    99%
colossalai/shardformer/policies/gpt2.py                                    185      1    99%
colossalai/shardformer/policies/t5.py                                      177      5    97%
colossalai/shardformer/policies/whisper.py                                 196      9    95%
colossalai/shardformer/shard/shard_config.py                                30      0   100%
tests/test_config/test_load_config.py                                        9      0   100%
tests/test_context/test_hybrid_parallel.py                                 105     25    76%
tests/test_data/test_cifar10_dataset.py                                     14      1    93%
tests/test_data/test_data_parallel_sampler.py                               35      1    97%
tests/test_data/test_deterministic_dataloader.py                            34      1    97%
tests/test_inference/test_pipeline_infer.py                                 38      1    97%
tests/test_pipeline/test_pipeline_utils/test_t5_pipeline_utils.py           17      0   100%
tests/test_pipeline/test_pipeline_utils/test_whisper_pipeline_utils.py      20      2    90%
tests/test_pipeline/test_schedule/test_interleaved.py                       99      1    99%
tests/test_pipeline/test_stage_manager.py                                   45      1    98%
tests/test_shardformer/test_layer/test_gpt2_qkv_fused_linear_1d.py          93      1    99%
tests/test_shardformer/test_layer/test_linear_1d.py                        116      1    99%
tests/test_shardformer/test_model/_utils.py                                160     21    87%
tests/test_shardformer/test_model/test_shard_bert.py                        59      1    98%
tests/test_shardformer/test_model/test_shard_bloom.py                       56      1    98%
tests/test_shardformer/test_model/test_shard_gpt2.py                        58      1    98%
tests/test_shardformer/test_model/test_shard_llama.py                       61      1    98%
tests/test_shardformer/test_model/test_shard_opt.py                         59      1    98%
tests/test_shardformer/test_model/test_shard_t5.py                          60      1    98%
tests/test_shardformer/test_model/test_shard_vit.py                         58      1    98%
tests/test_shardformer/test_model/test_shard_whisper.py                     67      4    94%
tests/test_utils/test_activation_checkpointing.py                           81      1    99%
--------------------------------------------------------------------------------------------
TOTAL                                                                     6015    934    84%

@github-actions
Copy link
Contributor

The code coverage for the changed files is 5%.

Click me to view the complete report
Name                                                      Stmts   Miss  Cover
-----------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py         185    185     0%
colossalai/cluster/process_group_mesh.py                     73     47    36%
colossalai/inference/__init__.py                              2      2     0%
colossalai/inference/pipeline/__init__.py                     2      2     0%
colossalai/inference/pipeline/engine.py                      34     34     0%
colossalai/inference/pipeline/microbatch_manager.py          86     86     0%
colossalai/inference/pipeline/modeling/__init__.py            0      0   100%
colossalai/inference/pipeline/modeling/gpt2.py              135    135     0%
colossalai/inference/pipeline/utils.py                       15     15     0%
colossalai/pipeline/p2p.py                                   96     96     0%
colossalai/pipeline/schedule/generate.py                     79     79     0%
colossalai/pipeline/schedule/interleaved_pp.py              170    170     0%
colossalai/pipeline/schedule/one_f_one_b.py                 132    132     0%
colossalai/pipeline/stage_manager.py                         50     32    36%
colossalai/shardformer/layer/_operation.py                  284    213    25%
colossalai/shardformer/layer/linear.py                      188    157    16%
colossalai/shardformer/layer/qkv_fused_linear.py            299    262    12%
colossalai/shardformer/modeling/bert.py                     482    482     0%
colossalai/shardformer/modeling/bloom.py                    458    458     0%
colossalai/shardformer/modeling/gpt2.py                     397    397     0%
colossalai/shardformer/modeling/whisper.py                  319    319     0%
colossalai/shardformer/policies/base_policy.py               91     45    51%
colossalai/shardformer/policies/bert.py                     260    260     0%
colossalai/shardformer/policies/blip2.py                     49     49     0%
colossalai/shardformer/policies/bloom.py                    154    154     0%
colossalai/shardformer/policies/gpt2.py                     185    185     0%
colossalai/shardformer/policies/t5.py                       177    177     0%
colossalai/shardformer/policies/whisper.py                  196    196     0%
colossalai/shardformer/shard/shard_config.py                 30     10    67%
tests/test_lazy/test_models.py                               15      1    93%
tests/test_shardformer/test_model/_utils.py                 160    160     0%
tests/test_shardformer/test_model/test_shard_bert.py         59     59     0%
tests/test_shardformer/test_model/test_shard_bloom.py        56     56     0%
tests/test_shardformer/test_model/test_shard_gpt2.py         58     58     0%
tests/test_shardformer/test_model/test_shard_llama.py        61     61     0%
tests/test_shardformer/test_model/test_shard_opt.py          59     59     0%
tests/test_shardformer/test_model/test_shard_t5.py           60     60     0%
tests/test_shardformer/test_model/test_shard_vit.py          58     58     0%
tests/test_shardformer/test_model/test_shard_whisper.py      67     67     0%
-----------------------------------------------------------------------------
TOTAL                                                      5281   5018     5%

1 similar comment
@github-actions
Copy link
Contributor

The code coverage for the changed files is 5%.

Click me to view the complete report
Name                                                      Stmts   Miss  Cover
-----------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py         185    185     0%
colossalai/cluster/process_group_mesh.py                     73     47    36%
colossalai/inference/__init__.py                              2      2     0%
colossalai/inference/pipeline/__init__.py                     2      2     0%
colossalai/inference/pipeline/engine.py                      34     34     0%
colossalai/inference/pipeline/microbatch_manager.py          86     86     0%
colossalai/inference/pipeline/modeling/__init__.py            0      0   100%
colossalai/inference/pipeline/modeling/gpt2.py              135    135     0%
colossalai/inference/pipeline/utils.py                       15     15     0%
colossalai/pipeline/p2p.py                                   96     96     0%
colossalai/pipeline/schedule/generate.py                     79     79     0%
colossalai/pipeline/schedule/interleaved_pp.py              170    170     0%
colossalai/pipeline/schedule/one_f_one_b.py                 132    132     0%
colossalai/pipeline/stage_manager.py                         50     32    36%
colossalai/shardformer/layer/_operation.py                  284    213    25%
colossalai/shardformer/layer/linear.py                      188    157    16%
colossalai/shardformer/layer/qkv_fused_linear.py            299    262    12%
colossalai/shardformer/modeling/bert.py                     482    482     0%
colossalai/shardformer/modeling/bloom.py                    458    458     0%
colossalai/shardformer/modeling/gpt2.py                     397    397     0%
colossalai/shardformer/modeling/whisper.py                  319    319     0%
colossalai/shardformer/policies/base_policy.py               91     45    51%
colossalai/shardformer/policies/bert.py                     260    260     0%
colossalai/shardformer/policies/blip2.py                     49     49     0%
colossalai/shardformer/policies/bloom.py                    154    154     0%
colossalai/shardformer/policies/gpt2.py                     185    185     0%
colossalai/shardformer/policies/t5.py                       177    177     0%
colossalai/shardformer/policies/whisper.py                  196    196     0%
colossalai/shardformer/shard/shard_config.py                 30     10    67%
tests/test_lazy/test_models.py                               15      1    93%
tests/test_shardformer/test_model/_utils.py                 160    160     0%
tests/test_shardformer/test_model/test_shard_bert.py         59     59     0%
tests/test_shardformer/test_model/test_shard_bloom.py        56     56     0%
tests/test_shardformer/test_model/test_shard_gpt2.py         58     58     0%
tests/test_shardformer/test_model/test_shard_llama.py        61     61     0%
tests/test_shardformer/test_model/test_shard_opt.py          59     59     0%
tests/test_shardformer/test_model/test_shard_t5.py           60     60     0%
tests/test_shardformer/test_model/test_shard_vit.py          58     58     0%
tests/test_shardformer/test_model/test_shard_whisper.py      67     67     0%
-----------------------------------------------------------------------------
TOTAL                                                      5281   5018     5%

@github-actions
Copy link
Contributor

The code coverage for the changed files is 85%.

Click me to view the complete report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py                        185     14    92%
colossalai/cluster/process_group_mesh.py                                    73      1    99%
colossalai/inference/__init__.py                                             2      0   100%
colossalai/inference/pipeline/__init__.py                                    2      0   100%
colossalai/inference/pipeline/engine.py                                     34      0   100%
colossalai/inference/pipeline/microbatch_manager.py                         86      3    97%
colossalai/inference/pipeline/modeling/__init__.py                           0      0   100%
colossalai/inference/pipeline/modeling/gpt2.py                             135     50    63%
colossalai/inference/pipeline/policy/gpt2_ppinfer.py                        43      5    88%
colossalai/inference/pipeline/utils.py                                      15     10    33%
colossalai/pipeline/p2p.py                                                  96      7    93%
colossalai/pipeline/schedule/generate.py                                    79      1    99%
colossalai/pipeline/schedule/interleaved_pp.py                             170     10    94%
colossalai/pipeline/schedule/one_f_one_b.py                                132      4    97%
colossalai/pipeline/stage_manager.py                                        50      0   100%
colossalai/shardformer/layer/_operation.py                                 284    130    54%
colossalai/shardformer/layer/linear.py                                     188     53    72%
colossalai/shardformer/layer/qkv_fused_linear.py                           299     75    75%
colossalai/shardformer/modeling/bert.py                                    482    145    70%
colossalai/shardformer/modeling/bloom.py                                   458    141    69%
colossalai/shardformer/modeling/gpt2.py                                    397    122    69%
colossalai/shardformer/modeling/whisper.py                                 319     69    78%
colossalai/shardformer/policies/base_policy.py                              91      7    92%
colossalai/shardformer/policies/bert.py                                    260      0   100%
colossalai/shardformer/policies/blip2.py                                    49      2    96%
colossalai/shardformer/policies/bloom.py                                   154      2    99%
colossalai/shardformer/policies/gpt2.py                                    185      1    99%
colossalai/shardformer/policies/t5.py                                      177      5    97%
colossalai/shardformer/policies/whisper.py                                 196      9    95%
colossalai/shardformer/shard/shard_config.py                                30      0   100%
tests/test_checkpoint_io/test_low_level_zero_checkpoint_io.py               48      1    98%
tests/test_config/test_load_config.py                                        9      0   100%
tests/test_context/test_hybrid_parallel.py                                 105     25    76%
tests/test_data/test_cifar10_dataset.py                                     14      1    93%
tests/test_data/test_data_parallel_sampler.py                               35      1    97%
tests/test_data/test_deterministic_dataloader.py                            34      1    97%
tests/test_generate/test_pipeline_infer.py                                  43      1    98%
tests/test_lazy/test_models.py                                              15      1    93%
tests/test_pipeline/test_pipeline_utils/test_t5_pipeline_utils.py           17      0   100%
tests/test_pipeline/test_pipeline_utils/test_whisper_pipeline_utils.py      20      2    90%
tests/test_pipeline/test_schedule/test_interleaved.py                       99      1    99%
tests/test_pipeline/test_stage_manager.py                                   45      1    98%
tests/test_shardformer/test_layer/test_gpt2_qkv_fused_linear_1d.py          93      1    99%
tests/test_shardformer/test_layer/test_linear_1d.py                        116      1    99%
tests/test_shardformer/test_model/_utils.py                                160     21    87%
tests/test_shardformer/test_model/test_shard_bert.py                        59      1    98%
tests/test_shardformer/test_model/test_shard_bloom.py                       56      1    98%
tests/test_shardformer/test_model/test_shard_gpt2.py                        58      1    98%
tests/test_shardformer/test_model/test_shard_llama.py                       61      1    98%
tests/test_shardformer/test_model/test_shard_opt.py                         59      1    98%
tests/test_shardformer/test_model/test_shard_t5.py                          60      1    98%
tests/test_shardformer/test_model/test_shard_vit.py                         58      1    98%
tests/test_shardformer/test_model/test_shard_whisper.py                     67      4    94%
tests/test_utils/test_activation_checkpointing.py                           81      1    99%
--------------------------------------------------------------------------------------------
TOTAL                                                                     6083    936    85%

@FoolPlayer FoolPlayer merged commit b8571a7 into hpcaitech:feature/pipeline-infer Aug 30, 2023
5 checks passed
@github-actions
Copy link
Contributor

The code coverage for the changed files is 85%.

Click me to view the complete report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py                        185     14    92%
colossalai/cluster/process_group_mesh.py                                    73      1    99%
colossalai/inference/__init__.py                                             2      0   100%
colossalai/inference/pipeline/__init__.py                                    2      0   100%
colossalai/inference/pipeline/engine.py                                     34      0   100%
colossalai/inference/pipeline/microbatch_manager.py                         86      3    97%
colossalai/inference/pipeline/modeling/__init__.py                           0      0   100%
colossalai/inference/pipeline/modeling/gpt2.py                             135     50    63%
colossalai/inference/pipeline/policy/gpt2_ppinfer.py                        43      5    88%
colossalai/inference/pipeline/utils.py                                      15     10    33%
colossalai/pipeline/p2p.py                                                  96      7    93%
colossalai/pipeline/schedule/generate.py                                    79      1    99%
colossalai/pipeline/schedule/interleaved_pp.py                             170     10    94%
colossalai/pipeline/schedule/one_f_one_b.py                                132      4    97%
colossalai/pipeline/stage_manager.py                                        50      0   100%
colossalai/shardformer/layer/_operation.py                                 284    130    54%
colossalai/shardformer/layer/linear.py                                     188     53    72%
colossalai/shardformer/layer/qkv_fused_linear.py                           299     75    75%
colossalai/shardformer/modeling/bert.py                                    482    145    70%
colossalai/shardformer/modeling/bloom.py                                   458    141    69%
colossalai/shardformer/modeling/gpt2.py                                    397    122    69%
colossalai/shardformer/modeling/whisper.py                                 319     69    78%
colossalai/shardformer/policies/base_policy.py                              91      7    92%
colossalai/shardformer/policies/bert.py                                    260      0   100%
colossalai/shardformer/policies/blip2.py                                    49      2    96%
colossalai/shardformer/policies/bloom.py                                   154      2    99%
colossalai/shardformer/policies/gpt2.py                                    185      1    99%
colossalai/shardformer/policies/t5.py                                      177      5    97%
colossalai/shardformer/policies/whisper.py                                 196      9    95%
colossalai/shardformer/shard/shard_config.py                                30      0   100%
tests/test_checkpoint_io/test_low_level_zero_checkpoint_io.py               48      1    98%
tests/test_config/test_load_config.py                                        9      0   100%
tests/test_context/test_hybrid_parallel.py                                 105     25    76%
tests/test_data/test_cifar10_dataset.py                                     14      1    93%
tests/test_data/test_data_parallel_sampler.py                               35      1    97%
tests/test_data/test_deterministic_dataloader.py                            34      1    97%
tests/test_generate/test_pipeline_infer.py                                  43      1    98%
tests/test_pipeline/test_pipeline_utils/test_t5_pipeline_utils.py           17      0   100%
tests/test_pipeline/test_pipeline_utils/test_whisper_pipeline_utils.py      20      2    90%
tests/test_pipeline/test_schedule/test_interleaved.py                       99      1    99%
tests/test_pipeline/test_stage_manager.py                                   45      1    98%
tests/test_shardformer/test_layer/test_gpt2_qkv_fused_linear_1d.py          93      1    99%
tests/test_shardformer/test_layer/test_linear_1d.py                        116      1    99%
tests/test_shardformer/test_model/_utils.py                                160     21    87%
tests/test_shardformer/test_model/test_shard_bert.py                        59      1    98%
tests/test_shardformer/test_model/test_shard_bloom.py                       56      1    98%
tests/test_shardformer/test_model/test_shard_gpt2.py                        58      1    98%
tests/test_shardformer/test_model/test_shard_llama.py                       61      1    98%
tests/test_shardformer/test_model/test_shard_opt.py                         59      1    98%
tests/test_shardformer/test_model/test_shard_t5.py                          60      1    98%
tests/test_shardformer/test_model/test_shard_vit.py                         58      1    98%
tests/test_shardformer/test_model/test_shard_whisper.py                     67      4    94%
tests/test_utils/test_activation_checkpointing.py                           81      1    99%
--------------------------------------------------------------------------------------------
TOTAL                                                                     6068    935    85%

1 similar comment
@github-actions
Copy link
Contributor

The code coverage for the changed files is 85%.

Click me to view the complete report
Name                                                                     Stmts   Miss  Cover
--------------------------------------------------------------------------------------------
colossalai/booster/plugin/hybrid_parallel_plugin.py                        185     14    92%
colossalai/cluster/process_group_mesh.py                                    73      1    99%
colossalai/inference/__init__.py                                             2      0   100%
colossalai/inference/pipeline/__init__.py                                    2      0   100%
colossalai/inference/pipeline/engine.py                                     34      0   100%
colossalai/inference/pipeline/microbatch_manager.py                         86      3    97%
colossalai/inference/pipeline/modeling/__init__.py                           0      0   100%
colossalai/inference/pipeline/modeling/gpt2.py                             135     50    63%
colossalai/inference/pipeline/policy/gpt2_ppinfer.py                        43      5    88%
colossalai/inference/pipeline/utils.py                                      15     10    33%
colossalai/pipeline/p2p.py                                                  96      7    93%
colossalai/pipeline/schedule/generate.py                                    79      1    99%
colossalai/pipeline/schedule/interleaved_pp.py                             170     10    94%
colossalai/pipeline/schedule/one_f_one_b.py                                132      4    97%
colossalai/pipeline/stage_manager.py                                        50      0   100%
colossalai/shardformer/layer/_operation.py                                 284    130    54%
colossalai/shardformer/layer/linear.py                                     188     53    72%
colossalai/shardformer/layer/qkv_fused_linear.py                           299     75    75%
colossalai/shardformer/modeling/bert.py                                    482    145    70%
colossalai/shardformer/modeling/bloom.py                                   458    141    69%
colossalai/shardformer/modeling/gpt2.py                                    397    122    69%
colossalai/shardformer/modeling/whisper.py                                 319     69    78%
colossalai/shardformer/policies/base_policy.py                              91      7    92%
colossalai/shardformer/policies/bert.py                                    260      0   100%
colossalai/shardformer/policies/blip2.py                                    49      2    96%
colossalai/shardformer/policies/bloom.py                                   154      2    99%
colossalai/shardformer/policies/gpt2.py                                    185      1    99%
colossalai/shardformer/policies/t5.py                                      177      5    97%
colossalai/shardformer/policies/whisper.py                                 196      9    95%
colossalai/shardformer/shard/shard_config.py                                30      0   100%
tests/test_checkpoint_io/test_low_level_zero_checkpoint_io.py               48      1    98%
tests/test_config/test_load_config.py                                        9      0   100%
tests/test_context/test_hybrid_parallel.py                                 105     25    76%
tests/test_data/test_cifar10_dataset.py                                     14      1    93%
tests/test_data/test_data_parallel_sampler.py                               35      1    97%
tests/test_data/test_deterministic_dataloader.py                            34      1    97%
tests/test_generate/test_pipeline_infer.py                                  43      1    98%
tests/test_pipeline/test_pipeline_utils/test_t5_pipeline_utils.py           17      0   100%
tests/test_pipeline/test_pipeline_utils/test_whisper_pipeline_utils.py      20      2    90%
tests/test_pipeline/test_schedule/test_interleaved.py                       99      1    99%
tests/test_pipeline/test_stage_manager.py                                   45      1    98%
tests/test_shardformer/test_layer/test_gpt2_qkv_fused_linear_1d.py          93      1    99%
tests/test_shardformer/test_layer/test_linear_1d.py                        116      1    99%
tests/test_shardformer/test_model/_utils.py                                160     21    87%
tests/test_shardformer/test_model/test_shard_bert.py                        59      1    98%
tests/test_shardformer/test_model/test_shard_bloom.py                       56      1    98%
tests/test_shardformer/test_model/test_shard_gpt2.py                        58      1    98%
tests/test_shardformer/test_model/test_shard_llama.py                       61      1    98%
tests/test_shardformer/test_model/test_shard_opt.py                         59      1    98%
tests/test_shardformer/test_model/test_shard_t5.py                          60      1    98%
tests/test_shardformer/test_model/test_shard_vit.py                         58      1    98%
tests/test_shardformer/test_model/test_shard_whisper.py                     67      4    94%
tests/test_utils/test_activation_checkpointing.py                           81      1    99%
--------------------------------------------------------------------------------------------
TOTAL                                                                     6068    935    85%

@FoolPlayer FoolPlayer deleted the infer branch September 7, 2023 11:10
FoolPlayer added a commit that referenced this pull request Sep 27, 2023
* add pp stage manager as circle stage

* fix a bug when create process group

* add ppinfer basic framework

* add micro batch manager and support kvcache-pp gpt2 fwd

* add generate schedule

* use mb size to control mb number

* support generate with kv cache

* add output, remove unused code

* add test

* reuse shardformer to build model

* refactor some code and use the same attribute name of hf

* fix review and add test for generation

* remove unused file

* fix CI

* add cache clear

* fix code error

* fix typo
FoolPlayer added a commit that referenced this pull request Oct 11, 2023
* [pipeline inference] pipeline inference (#4492)

* add pp stage manager as circle stage

* fix a bug when create process group

* add ppinfer basic framework

* add micro batch manager and support kvcache-pp gpt2 fwd

* add generate schedule

* use mb size to control mb number

* support generate with kv cache

* add output, remove unused code

* add test

* reuse shardformer to build model

* refactor some code and use the same attribute name of hf

* fix review and add test for generation

* remove unused file

* fix CI

* add cache clear

* fix code error

* fix typo

* [Pipeline inference] Modify to tieweight (#4599)

* add pp stage manager as circle stage

* fix a bug when create process group

* add ppinfer basic framework

* add micro batch manager and support kvcache-pp gpt2 fwd

* add generate schedule

* use mb size to control mb number

* support generate with kv cache

* add output, remove unused code

* add test

* reuse shardformer to build model

* refactor some code and use the same attribute name of hf

* fix review and add test for generation

* remove unused file

* modify the way of saving newtokens

* modify to tieweight

* modify test

* remove unused file

* solve review

* add docstring

* [Pipeline inference] support llama pipeline inference (#4647)

* support llama pipeline inference

* remove tie weight operation

* [pipeline inference] Fix the blocking of communication when ppsize is 2 (#4708)

* add benchmark verbose

* fix export tokens

* fix benchmark verbose

* add P2POp style to do p2p communication

* modify schedule as p2p type when ppsize is 2

* remove unused code and add docstring

* [Pipeline inference] Refactor code, add docsting, fix bug (#4790)

* add benchmark script

* update argparse

* fix fp16 load

* refactor code style

* add docstring

* polish code

* fix test bug

* [Pipeline inference] Add pipeline inference docs (#4817)

* add readme doc

* add a ico

* Add performance

* update table of contents

* refactor code (#4873)
flybird11111 pushed a commit to flybird11111/ColossalAI that referenced this pull request Oct 18, 2023
…h#4820)

* [pipeline inference] pipeline inference (hpcaitech#4492)

* add pp stage manager as circle stage

* fix a bug when create process group

* add ppinfer basic framework

* add micro batch manager and support kvcache-pp gpt2 fwd

* add generate schedule

* use mb size to control mb number

* support generate with kv cache

* add output, remove unused code

* add test

* reuse shardformer to build model

* refactor some code and use the same attribute name of hf

* fix review and add test for generation

* remove unused file

* fix CI

* add cache clear

* fix code error

* fix typo

* [Pipeline inference] Modify to tieweight (hpcaitech#4599)

* add pp stage manager as circle stage

* fix a bug when create process group

* add ppinfer basic framework

* add micro batch manager and support kvcache-pp gpt2 fwd

* add generate schedule

* use mb size to control mb number

* support generate with kv cache

* add output, remove unused code

* add test

* reuse shardformer to build model

* refactor some code and use the same attribute name of hf

* fix review and add test for generation

* remove unused file

* modify the way of saving newtokens

* modify to tieweight

* modify test

* remove unused file

* solve review

* add docstring

* [Pipeline inference] support llama pipeline inference (hpcaitech#4647)

* support llama pipeline inference

* remove tie weight operation

* [pipeline inference] Fix the blocking of communication when ppsize is 2 (hpcaitech#4708)

* add benchmark verbose

* fix export tokens

* fix benchmark verbose

* add P2POp style to do p2p communication

* modify schedule as p2p type when ppsize is 2

* remove unused code and add docstring

* [Pipeline inference] Refactor code, add docsting, fix bug (hpcaitech#4790)

* add benchmark script

* update argparse

* fix fp16 load

* refactor code style

* add docstring

* polish code

* fix test bug

* [Pipeline inference] Add pipeline inference docs (hpcaitech#4817)

* add readme doc

* add a ico

* Add performance

* update table of contents

* refactor code (hpcaitech#4873)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants