Skip to content

[pipeline] fit shardformer policy#4176

Merged
CjhHa1 merged 6 commits intohpcaitech:feature/pipelinefrom
ver217:feature/pipeline-policy
Jul 5, 2023
Merged

[pipeline] fit shardformer policy#4176
CjhHa1 merged 6 commits intohpcaitech:feature/pipelinefrom
ver217:feature/pipeline-policy

Conversation

@ver217
Copy link
Copy Markdown
Contributor

@ver217 ver217 commented Jul 5, 2023

📌 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

Closes #4119

📝 What does this PR do?

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

Update shardformer to fit pipeline.

💥 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.

@ver217 ver217 added the enhancement New feature or request label Jul 5, 2023
@ver217 ver217 requested a review from FrankLeeeee July 5, 2023 06:54
@ver217 ver217 linked an issue Jul 5, 2023 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

@CjhHa1 CjhHa1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread colossalai/shardformer/policies/basepolicy.py
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 5, 2023

The code coverage for the changed files is 81%.

Click me to view the complete report
Name                                                                Stmts   Miss  Cover
---------------------------------------------------------------------------------------
colossalai/cluster/__init__.py                                          5      0   100%
colossalai/cluster/process_group_mesh.py                               72      2    97%
colossalai/interface/optimizer.py                                      43      6    86%
colossalai/pipeline/p2p.py                                             96      8    92%
colossalai/pipeline/policy/__init__.py                                 12      4    67%
colossalai/pipeline/policy/base.py                                     70     43    39%
colossalai/pipeline/policy/bert.py                                    168     72    57%
colossalai/pipeline/policy/bloom.py                                   109     28    74%
colossalai/pipeline/schedule/__init__.py                                3      0   100%
colossalai/pipeline/schedule/_utils.py                                 50     19    62%
colossalai/pipeline/schedule/base.py                                   10      2    80%
colossalai/pipeline/schedule/one_f_one_b.py                           110     91    17%
colossalai/pipeline/stage_manager.py                                   68      4    94%
colossalai/shardformer/policies/auto_policy.py                         27      2    93%
colossalai/shardformer/policies/base_policy.py                         61      9    85%
colossalai/shardformer/policies/bert.py                               109      2    98%
colossalai/shardformer/policies/bloom.py                               60      3    95%
colossalai/shardformer/policies/gpt2.py                                68      2    97%
colossalai/shardformer/policies/llama.py                               43      2    95%
colossalai/shardformer/policies/opt.py                                 50      2    96%
colossalai/shardformer/policies/t5.py                                  74      2    97%
colossalai/shardformer/policies/vit.py                                 26     26     0%
colossalai/shardformer/shard/shard_config.py                           24      2    92%
colossalai/shardformer/shard/sharder.py                                83      9    89%
colossalai/shardformer/shard/shardformer.py                            15      0   100%
colossalai/shardformer/shard/utils.py                                  11      1    91%
tests/test_cluster/test_process_group_mesh.py                          86      1    99%
tests/test_pipeline/test_p2p_communication.py                          44      1    98%
tests/test_pipeline/test_policy/test_bert_model.py                     63      2    97%
tests/test_pipeline/test_schedule/test_pipeline_schedule_utils.py      40      0   100%
tests/test_pipeline/test_stage_manager.py                              52      1    98%
tests/test_shardformer/test_model/_utils.py                            21      0   100%
tests/test_shardformer/test_shard_utils.py                             21      0   100%
tests/test_shardformer/test_with_torch_ddp.py                          46      2    96%
---------------------------------------------------------------------------------------
TOTAL                                                                1840    348    81%

@CjhHa1 CjhHa1 merged commit 12e6d5d into hpcaitech:feature/pipeline Jul 5, 2023
@ver217 ver217 deleted the feature/pipeline-policy branch July 5, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[pipeline] fit shardformer policy

3 participants