Skip to content

[shardformer] Unit test#3928

Merged
FrankLeeeee merged 6 commits intohpcaitech:feature/shardformerfrom
FoolPlayer:unit_test
Jun 12, 2023
Merged

[shardformer] Unit test#3928
FrankLeeeee merged 6 commits intohpcaitech:feature/shardformerfrom
FoolPlayer:unit_test

Conversation

@FoolPlayer
Copy link
Copy Markdown
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

fixed #3927

📝 What does this PR do?

Add unit test of shardformer

💥 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
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2023

The code coverage for the changed files is 25%.

Click me to view the complete report
Name                                                 Stmts   Miss  Cover
------------------------------------------------------------------------
colossalai/nn/layer/parallel_1d/_operation.py           53     26    51%
colossalai/shardformer/__init__.py                       0      0   100%
colossalai/shardformer/layer/__init__.py                 0      0   100%
colossalai/shardformer/layer/_operation.py              54     54     0%
colossalai/shardformer/layer/dist_crossentropy.py       49     49     0%
colossalai/shardformer/layer/dropout.py                 32      0   100%
colossalai/shardformer/layer/layers.py                 464    464     0%
colossalai/shardformer/model/__init__.py                 0      0   100%
colossalai/shardformer/model/modeling_bert.py           20     20     0%
colossalai/shardformer/policies/__init__.py              0      0   100%
colossalai/shardformer/policies/autopolicy.py           22     19    14%
colossalai/shardformer/policies/basepolicy.py           49      9    82%
colossalai/shardformer/policies/bert.py                 40     40     0%
colossalai/shardformer/policies/gpt2.py                 35     35     0%
colossalai/shardformer/shard/__init__.py                 4      0   100%
colossalai/shardformer/shard/shard_config.py            14      0   100%
colossalai/shardformer/shard/sharder.py                123    101    18%
colossalai/shardformer/shard/slicer.py                  50      3    94%
colossalai/shardformer/utils/__init__.py                 0      0   100%
colossalai/shardformer/utils/utils.py                   28     25    11%
tests/test_shardformer/test_module/test_dropout.py      35      1    97%
tests/test_shardformer/test_module/test_slicer.py       51      1    98%
------------------------------------------------------------------------
TOTAL                                                 1123    847    25%

Comment thread colossalai/shardformer/layer/dropout.py
@FoolPlayer
Copy link
Copy Markdown
Contributor Author

Local test of shardformer:

image

@FrankLeeeee FrankLeeeee merged commit e6ebc05 into hpcaitech:feature/shardformer Jun 12, 2023
@FoolPlayer FoolPlayer deleted the unit_test branch June 12, 2023 07:01
@FoolPlayer FoolPlayer linked an issue Jun 13, 2023 that may be closed by this pull request
FrankLeeeee pushed a commit that referenced this pull request Jun 26, 2023
* fix bug in slicer, add slicer unit test

* add dropout test

* use pid as dropout seed

* updata dropout test with local pattern

* ad todo
flybird11111 pushed a commit to flybird11111/ColossalAI that referenced this pull request Jul 3, 2023
* fix bug in slicer, add slicer unit test

* add dropout test

* use pid as dropout seed

* updata dropout test with local pattern

* ad todo
FrankLeeeee pushed a commit that referenced this pull request Jul 4, 2023
* fix bug in slicer, add slicer unit test

* add dropout test

* use pid as dropout seed

* updata dropout test with local pattern

* ad todo
ver217 pushed a commit to ver217/ColossalAI that referenced this pull request Jul 13, 2023
* fix bug in slicer, add slicer unit test

* add dropout test

* use pid as dropout seed

* updata dropout test with local pattern

* ad todo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[shardformer] add unit testing for shardformer components

2 participants