Skip to content

Remove dependency of mindformers #666

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

Merged
merged 11 commits into from
Feb 26, 2024
Merged

Conversation

horcham
Copy link
Collaborator

@horcham horcham commented Feb 2, 2024

Thank you for your contribution to the MindOCR repo.
Before submitting this PR, please make sure:

Motivation

  • 除去mindformers依赖
  • 精度验证未达标:avg acc: 0.9088;目标avg acc: 0.9135。差距0.47%。
  • 验证当前ckpt可用:avg acc:0.9135058;目标avg acc:0.9135
  • 需要确认以下变更带来的影响
    image
    该变更不会引入影响,原因如下:
  1. 该修改会影响到TransformerDecoderLayer的行为。影响路径为TopkRouter->MoE->TransformerDecoderLayer。影响作用在accum_combine_tensor的值。
  2. TransformerDecoderLayer中使用默认参数moe_config, 其expert_num=1,use_moe为False,因此class MoE并为被使用
    (Write your motivation for proposed changes here.)。
  3. 若TransformerDecoderLayer所使用的moe_config中expert_num>1,则该影响会生效。

Test Plan

(How should this PR be tested? Do you require special setup to run the test or repro the fixed bug?)

Related Issues and PRs

(Is this PR part of a group of changes? Link the other relevant PRs and Issues here. Use https://help.github.com/en/articles/closing-issues-using-keywords for help on GitHub syntax)

@horcham horcham force-pushed the abinet branch 5 times, most recently from fbc171a to a9d4e9c Compare February 4, 2024 09:19
@horcham horcham changed the title [WIP] Remove dependency of mindformers Remove dependency of mindformers Feb 5, 2024
@horcham horcham force-pushed the abinet branch 7 times, most recently from 8d9489d to da1e183 Compare February 8, 2024 01:22
@horcham horcham force-pushed the abinet branch 4 times, most recently from fdfcd5b to 3d64e51 Compare February 17, 2024 02:36
RuntimeError: Run task for graph:kernel_graph_1 error! The details reger to 'Ascend Error Message'
```

请尝试将CANN更新到7.1。
Copy link
Collaborator

Choose a reason for hiding this comment

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

请尝试将CANN升级到与MindSpore版本匹配的7.1版本。

请看下这样阐述是否更准确?

Copy link
Collaborator

Choose a reason for hiding this comment

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

backbones下已有一个mindcv_models,请注意命名格式统一是否更好,比如取名mindformers_models。
或者直接将layers.py取一个合适的名字(比如transformer_layers.py或mindformers_layers.py),放在mindcv_models文件夹下。

Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. 删除license
  2. 本文件在MindSpore主仓中有(mindspore\python\mindspore\parallel_transformer\moe.py),可以直接引用。

Copy link
Collaborator

Choose a reason for hiding this comment

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

mindspore已有类似文件mindspore\python\mindspore\parallel_transformer\transformer.py,建议考虑优先复用。

Copy link
Collaborator

Choose a reason for hiding this comment

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

mindspore主仓已有类似文件mindspore\python\mindspore\parallel_transformer\op_parallel_config.py,建议考虑优先复用。

Copy link
Collaborator

Choose a reason for hiding this comment

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

mindspore主仓下的mindspore\python\mindspore\parallel_transformer\layers.py是否可复用?

@panshaowu panshaowu merged commit dc93092 into mindspore-lab:main Feb 26, 2024
panshaowu added a commit that referenced this pull request Feb 29, 2024
* Remove dependency of mindformers  (#666)

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* remove mindformers

* Fix problems of psenet-ctw1500 training

* remove dependency

* use transformer from mindspore

* remove code from mindformers

* revise the readme of CRNN (#672)

* revise whl deploy setting and version info

* fix issue #470

* revise the readme of CRNN

---------

Co-authored-by: panshaowu <panshaowu@huawei.com>

* fix data bug (#673)

---------

Co-authored-by: horcham <690936541@qq.com>
Co-authored-by: panshaowu <panshaowu@huawei.com>
Co-authored-by: chengtianwu <53269662+chengtianwu@users.noreply.github.com>
panshaowu added a commit that referenced this pull request Mar 22, 2024
* add mindformers as submodule

* vary qwen

* adapt graph mode

* add CLIP for Vary

* sync behind commit from main (#675)

* Remove dependency of mindformers  (#666)

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* remove mindformers

* Fix problems of psenet-ctw1500 training

* remove dependency

* use transformer from mindspore

* remove code from mindformers

* revise the readme of CRNN (#672)

* revise whl deploy setting and version info

* fix issue #470

* revise the readme of CRNN

---------

Co-authored-by: panshaowu <panshaowu@huawei.com>

* fix data bug (#673)

---------

Co-authored-by: horcham <690936541@qq.com>
Co-authored-by: panshaowu <panshaowu@huawei.com>
Co-authored-by: chengtianwu <53269662+chengtianwu@users.noreply.github.com>

* add SAM for Vary

* add data process and speed up vary

* speed up vary

* add generation

* add chat vary

---------

Co-authored-by: w00517672 <wutiancheng@huawei.com>
Co-authored-by: panshaowu <panshaowu@huawei.com>
Co-authored-by: horcham <690936541@qq.com>
Co-authored-by: chengtianwu <53269662+chengtianwu@users.noreply.github.com>
horcham added a commit to horcham/mindocr that referenced this pull request Apr 19, 2024
* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* remove mindformers

* Fix problems of psenet-ctw1500 training

* remove dependency

* use transformer from mindspore

* remove code from mindformers
panshaowu pushed a commit that referenced this pull request Apr 22, 2024
* Fix problems of psenet-ctw1500 training

* update doc

* Remove dependency of mindformers  (#666)

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* Fix problems of psenet-ctw1500 training

* remove mindformers

* Fix problems of psenet-ctw1500 training

* remove dependency

* use transformer from mindspore

* remove code from mindformers
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