Skip to content

[gemini] fixed the gemini checkpoint io#3934

Merged
FrankLeeeee merged 1 commit intohpcaitech:developfrom
FrankLeeeee:hotfix/gemini-ckpt-io
Jun 9, 2023
Merged

[gemini] fixed the gemini checkpoint io#3934
FrankLeeeee merged 1 commit intohpcaitech:developfrom
FrankLeeeee:hotfix/gemini-ckpt-io

Conversation

@FrankLeeeee
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

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

Fixed #3933

📝 What does this PR do?

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

This PR fixed the logic to handle the parameter shard block in the Gemini's model state dict to avoid empty checkpoint shard.

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

@FrankLeeeee FrankLeeeee added bug Something isn't working gemini related to the gemini feature labels Jun 8, 2023
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 8, 2023

The code coverage for the changed files is 86%.

Click me to view the complete report
Name                                                      Stmts   Miss  Cover
-----------------------------------------------------------------------------
colossalai/booster/plugin/gemini_plugin.py                  110      9    92%
colossalai/checkpoint_io/index_file.py                       65     16    75%
colossalai/device/device_mesh.py                            143      6    96%
colossalai/lazy/lazy_init.py                                299     40    87%
colossalai/tensor/comm_spec.py                              253     93    63%
colossalai/tensor/d_tensor/__init__.py                        3      0   100%
colossalai/tensor/d_tensor/comm_spec.py                     151     35    77%
colossalai/tensor/d_tensor/d_tensor.py                       67     11    84%
colossalai/tensor/d_tensor/layout.py                         38      1    97%
colossalai/tensor/d_tensor/layout_converter.py              202     13    94%
colossalai/tensor/d_tensor/sharding_spec.py                 105     14    87%
colossalai/zero/gemini/gemini_ddp.py                        402     67    83%
tests/test_device/test_device_mesh.py                        11      1    91%
tests/test_device/test_init_logical_pg.py                    27      1    96%
tests/test_lazy/lazy_init_utils.py                           71     14    80%
tests/test_lazy/test_distribute.py                           73      3    96%
tests/test_tensor/test_dtensor/test_comm_spec.py             81      1    99%
tests/test_tensor/test_dtensor/test_dtensor.py               67      5    93%
tests/test_tensor/test_dtensor/test_layout_converter.py      91      1    99%
tests/test_tensor/test_shape_consistency.py                  50      2    96%
tests/test_tensor/test_sharded_linear.py                    130      1    99%
tests/test_tensor/test_sharding_spec.py                      13      1    92%
-----------------------------------------------------------------------------
TOTAL                                                      2452    335    86%

@FrankLeeeee FrankLeeeee merged commit bd1ab98 into hpcaitech:develop Jun 9, 2023
ver217 pushed a commit to ver217/ColossalAI that referenced this pull request Jun 12, 2023
Fridge003 pushed a commit to Fridge003/ColossalAI that referenced this pull request Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working gemini related to the gemini feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants