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

[legacy] move unused and outdated codes to legacy #4611

Merged
merged 3 commits into from
Sep 5, 2023
Merged

Conversation

ver217
Copy link
Member

@ver217 ver217 commented Sep 4, 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

📝 What does this PR do?

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

  1. Move trainer, engine, builder and registry to legacy folder, as these codes are not used anymore and have equivalent substitution.
  2. Update related docs.
  3. Move related tests to tests/test_legacy. And this folder is ignored in CI.

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

* [legacy] move trainer to legacy

* [doc] update docs related to trainer

* [test] ignore legacy test
* [legacy] move engine to legacy

* [example] fix seq parallel example

* [example] fix seq parallel example

* [test] test gemini pluging hang

* [test] test gemini pluging hang

* [test] test gemini pluging hang

* [test] test gemini pluging hang

* [test] test gemini pluging hang

* [example] update seq parallel requirements
@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2023

The code coverage for the changed files is 48%.

Click me to view the complete report
Name                                                                               Stmts   Miss  Cover
------------------------------------------------------------------------------------------------------
colossalai/auto_parallel/tensor_shard/node_handler/registry.py                        19     19     0%
colossalai/context/parallel_context.py                                               227     13    94%
colossalai/context/process_group_initializer/initializer_1d.py                        29      0   100%
colossalai/context/process_group_initializer/initializer_2d.py                        72      1    99%
colossalai/context/process_group_initializer/initializer_2p5d.py                     136      2    99%
colossalai/context/process_group_initializer/initializer_3d.py                       155      1    99%
colossalai/context/process_group_initializer/initializer_data.py                      27      0   100%
colossalai/context/process_group_initializer/initializer_model.py                     28      0   100%
colossalai/context/process_group_initializer/initializer_pipeline.py                  26      0   100%
colossalai/context/process_group_initializer/initializer_sequence.py                  42      0   100%
colossalai/context/process_group_initializer/initializer_tensor.py                    27      0   100%
colossalai/initialize.py                                                             188     77    59%
colossalai/legacy/__init__.py                                                          0      0   100%
colossalai/legacy/builder/__init__.py                                                  2      0   100%
colossalai/legacy/builder/builder.py                                                  21      5    76%
colossalai/legacy/engine/__init__.py                                                   3      0   100%
colossalai/legacy/engine/_base_engine.py                                              90     23    74%
colossalai/legacy/engine/gradient_accumulation/__init__.py                            15      2    87%
colossalai/legacy/engine/gradient_accumulation/_gradient_accumulation.py             107     39    64%
colossalai/legacy/engine/gradient_handler/__init__.py                                  7      0   100%
colossalai/legacy/engine/gradient_handler/_base_gradient_handler.py                    8      1    88%
colossalai/legacy/engine/gradient_handler/_data_parallel_gradient_handler.py          10      0   100%
colossalai/legacy/engine/gradient_handler/_moe_gradient_handler.py                    20      9    55%
colossalai/legacy/engine/gradient_handler/_pipeline_parallel_gradient_handler.py      24     14    42%
colossalai/legacy/engine/gradient_handler/_sequence_parallel_gradient_handler.py      10      2    80%
colossalai/legacy/engine/gradient_handler/_zero_gradient_handler.py                    6      1    83%
colossalai/legacy/engine/gradient_handler/utils.py                                    21      0   100%
colossalai/legacy/engine/schedule/__init__.py                                          4      0   100%
colossalai/legacy/engine/schedule/_base_schedule.py                                   76     55    28%
colossalai/legacy/engine/schedule/_non_pipeline_schedule.py                           30     20    33%
colossalai/legacy/engine/schedule/_pipeline_schedule.py                              430    397     8%
colossalai/legacy/engine/schedule/_pipeline_schedule_v2.py                            78     78     0%
colossalai/legacy/registry/__init__.py                                                17      0   100%
colossalai/legacy/registry/registry.py                                                31     10    68%
colossalai/legacy/trainer/__init__.py                                                  2      2     0%
colossalai/legacy/trainer/_trainer.py                                                170    170     0%
colossalai/legacy/trainer/hooks/__init__.py                                            6      6     0%
colossalai/legacy/trainer/hooks/_base_hook.py                                         34     34     0%
colossalai/legacy/trainer/hooks/_checkpoint_hook.py                                   31     31     0%
colossalai/legacy/trainer/hooks/_commons_.py                                           7      7     0%
colossalai/legacy/trainer/hooks/_log_hook.py                                         145    145     0%
colossalai/legacy/trainer/hooks/_lr_scheduler_hook.py                                 21     21     0%
colossalai/legacy/trainer/hooks/_metric_hook.py                                      227    227     0%
colossalai/nn/layer/parallel_1d/layers.py                                            474    178    62%
colossalai/nn/layer/parallel_2d/layers.py                                            484    183    62%
colossalai/nn/layer/parallel_2p5d/layers.py                                          477    173    64%
colossalai/nn/layer/parallel_3d/layers.py                                            513    431    16%
colossalai/nn/layer/parallel_sequence/layers.py                                       92     70    24%
colossalai/nn/layer/vanilla/layers.py                                                147     59    60%
colossalai/nn/loss/loss_1d.py                                                         59      8    86%
colossalai/nn/loss/loss_2d.py                                                         74      8    89%
colossalai/nn/loss/loss_2p5d.py                                                       74      8    89%
colossalai/nn/loss/loss_3d.py                                                         81     55    32%
colossalai/nn/loss/loss_moe.py                                                        24     12    50%
colossalai/nn/lr_scheduler/cosine.py                                                  30     15    50%
colossalai/nn/lr_scheduler/linear.py                                                  12      6    50%
colossalai/nn/lr_scheduler/multistep.py                                               16      6    62%
colossalai/nn/lr_scheduler/onecycle.py                                                 7      2    71%
colossalai/nn/lr_scheduler/poly.py                                                    21     10    52%
colossalai/nn/lr_scheduler/torch.py                                                   21      4    81%
colossalai/nn/optimizer/cpu_adam.py                                                   68      4    94%
colossalai/nn/optimizer/fused_adam.py                                                 55     10    82%
colossalai/nn/optimizer/fused_lamb.py                                                 82     74    10%
colossalai/nn/optimizer/fused_sgd.py                                                  60     50    17%
colossalai/nn/optimizer/hybrid_adam.py                                                63      4    94%
colossalai/nn/optimizer/lamb.py                                                       54     47    13%
colossalai/nn/optimizer/lars.py                                                       55     46    16%
colossalai/utils/data_sampler/data_parallel_sampler.py                                58      8    86%
colossalai/utils/profiler/profiler.py                                                 62     62     0%
colossalai/utils/profiler/stateful_tensor_mem_extention.py                            92     92     0%
colossalai/zero/legacy/gemini/ophooks/_shard_grad_ophook.py                           19     19     0%
colossalai/zero/legacy/gemini/ophooks/_shard_param_ophook.py                          33     33     0%
colossalai/zero/legacy/sharded_model/zero_hook.py                                     73     50    32%
tests/test_booster/test_plugin/test_gemini_plugin.py                                  72      9    88%
tests/test_pipeline/test_cuda_rpc_performance.py                                      48     31    35%
------------------------------------------------------------------------------------------------------
TOTAL                                                                               6129   3179    48%

Copy link
Member

@TongLi3701 TongLi3701 left a comment

Choose a reason for hiding this comment

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

Thanks.

@ver217 ver217 merged commit ac178ca into main Sep 5, 2023
13 checks passed
@ver217 ver217 deleted the feature/remove-legacy branch September 5, 2023 13:53
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.

3 participants