Commit Graph

1006 Commits

Author SHA1 Message Date
yuze.zyz
0e4766f41d Fix bugs in testlevel1 & 2
1. Fix: ws regression failed.
2. Fix: label2id missing in text_classification_pipeline when preprocessor is passed in through args.
3. Fix: remove obsolete imports
4. Fix: incomplete modification
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10936431
2022-12-01 21:16:55 +08:00
rujiao.lrj
9d8eb5b0b3 support license plate detection
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10917315
2022-12-01 19:48:06 +08:00
suluyan.sly
1394019102 [to #42322933] plug finetune
plug finetune :已在du reader- robust数据集上回归至最佳结果
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10916382
2022-12-01 19:31:15 +08:00
james.wjg
9b3a92e65d cv/language_guided_video_summarization增加finetune
cv/language_guided_video_summarization增加finetune
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10790262
2022-12-01 19:16:56 +08:00
mulin.lyh
7039e93c99 skip temp failed case 2022-12-01 16:50:09 +08:00
yuze.zyz
bb5512d1ab [to #42322933] Refactor NLP and fix some user feedbacks
1. Abstract keys of dicts needed by nlp metric classes into the init method
2. Add Preprocessor.save_pretrained to save preprocessor information
3. Abstract the config saving function, which can lead to normally saving in the direct call of from_pretrained, and the modification of cfg one by one when training.
4. Remove SbertTokenizer and VecoTokenizer, use transformers' tokenizers instead
5. Use model/preprocessor's from_pretrained in all nlp pipeline classes.
6. Add model_kwargs and preprocessor_kwargs in all nlp pipeline classes
7. Add base classes for fill-mask and text-classification preprocessor, as a demo for later changes
8. Fix user feedback: Re-train the model in continue training scenario
9. Fix user feedback: Too many checkpoint saved
10. Simplify the nlp-trainer
11. Fix user feedback: Split the default trainer's __init__ method, which makes user easier to override
12. Add safe_get to Config class

----------------------------  Another refactor from version 36 -------------------------

13. Name all nlp transformers' preprocessors from TaskNamePreprocessor to TaskNameTransformersPreprocessor, for example:
      TextClassificationPreprocessor -> TextClassificationTransformersPreprocessor
14. Add a base class per task for all nlp tasks' preprocessors which has at least two sub-preprocessors
15. Add output classes of nlp models
16. Refactor the logic for token-classification
17. Fix bug: checkpoint_hook does not support pytorch_model.pt
18. Fix bug: Pipeline name does not match with task name, so inference will not succeed after training
       NOTE: This is just a stop bleeding solution, the root cause is the uncertainty of the relationship between models and pipelines
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10723513

    * add save_pretrained to preprocessor

* save preprocessor config in hook

* refactor label-id mapping fetching logic

* test ok on sentence-similarity

* run on finetuning

* fix bug

* pre-commit passed

* fix bug

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/preprocessors/nlp/nlp_base.py

* add params to init

* 1. support max ckpt num 2. support ignoring others but bin file in continue training 3. add arguments to some nlp metrics

* Split trainer init impls to overridable methods

* remove some obsolete tokenizers

* unfinished

* support input params in pipeline

* fix bugs

* fix ut bug

* fix bug

* fix ut bug

* fix ut bug

* fix ut bug

* add base class for some preprocessors

* Merge commit '379867739548f394d0fa349ba07afe04adf4c8b6' into feat/refactor_config

* compatible with old code

* fix ut bug

* fix ut bugs

* fix bug

* add some comments

* fix ut bug

* add a requirement

* fix pre-commit

* Merge commit '0451b3d3cb2bebfef92ec2c227b2a3dd8d01dc6a' into feat/refactor_config

* fixbug

* Support function type in registry

* fix ut bug

* fix bug

* Merge commit '5f719e542b963f0d35457e5359df879a5eb80b82' into feat/refactor_config

# Conflicts:
#	modelscope/pipelines/nlp/multilingual_word_segmentation_pipeline.py
#	modelscope/pipelines/nlp/named_entity_recognition_pipeline.py
#	modelscope/pipelines/nlp/word_segmentation_pipeline.py
#	modelscope/utils/hub.py

* remove obsolete file

* rename init args

* rename params

* fix merge bug

* add default preprocessor config for ner-model

* move a method a util file

* remove unused config

* Fix a bug in pbar

* bestckptsaver:change default ckpt numbers to 1

* 1. Add assert to max_epoch 2. split init_dist and get_device 3. change cmp func name

* Fix bug

* fix bug

* fix bug

* unfinished refactoring

* unfinished

* uw

* uw

* uw

* uw

* Merge branch 'feat/refactor_config' into feat/refactor_trainer

# Conflicts:
#	modelscope/preprocessors/nlp/document_segmentation_preprocessor.py
#	modelscope/preprocessors/nlp/faq_question_answering_preprocessor.py
#	modelscope/preprocessors/nlp/relation_extraction_preprocessor.py
#	modelscope/preprocessors/nlp/text_generation_preprocessor.py

* uw

* uw

* unify nlp task outputs

* uw

* uw

* uw

* uw

* change the order of text cls pipeline

* refactor t5

* refactor tg task preprocessor

* fix

* unfinished

* temp

* refactor code

* unfinished

* unfinished

* unfinished

* unfinished

* uw

* Merge branch 'feat/refactor_config' into feat/refactor_trainer

* smoke test pass

* ut testing

* pre-commit passed

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/models/nlp/bert/document_segmentation.py
#	modelscope/pipelines/nlp/__init__.py
#	modelscope/pipelines/nlp/document_segmentation_pipeline.py

* merge master

* unifnished

* Merge branch 'feat/fix_bug_pipeline_name' into feat/refactor_config

* fix bug

* fix ut bug

* support ner batch inference

* fix ut bug

* fix bug

* support batch inference on three nlp tasks

* unfinished

* fix bug

* fix bug

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/models/base/base_model.py
#	modelscope/pipelines/nlp/conversational_text_to_sql_pipeline.py
#	modelscope/pipelines/nlp/dialog_intent_prediction_pipeline.py
#	modelscope/pipelines/nlp/dialog_modeling_pipeline.py
#	modelscope/pipelines/nlp/dialog_state_tracking_pipeline.py
#	modelscope/pipelines/nlp/document_segmentation_pipeline.py
#	modelscope/pipelines/nlp/faq_question_answering_pipeline.py
#	modelscope/pipelines/nlp/feature_extraction_pipeline.py
#	modelscope/pipelines/nlp/fill_mask_pipeline.py
#	modelscope/pipelines/nlp/information_extraction_pipeline.py
#	modelscope/pipelines/nlp/named_entity_recognition_pipeline.py
#	modelscope/pipelines/nlp/sentence_embedding_pipeline.py
#	modelscope/pipelines/nlp/summarization_pipeline.py
#	modelscope/pipelines/nlp/table_question_answering_pipeline.py
#	modelscope/pipelines/nlp/text2text_generation_pipeline.py
#	modelscope/pipelines/nlp/text_classification_pipeline.py
#	modelscope/pipelines/nlp/text_error_correction_pipeline.py
#	modelscope/pipelines/nlp/text_generation_pipeline.py
#	modelscope/pipelines/nlp/text_ranking_pipeline.py
#	modelscope/pipelines/nlp/token_classification_pipeline.py
#	modelscope/pipelines/nlp/word_segmentation_pipeline.py
#	modelscope/pipelines/nlp/zero_shot_classification_pipeline.py
#	modelscope/trainers/nlp_trainer.py

* pre-commit passed

* fix bug

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/preprocessors/__init__.py

* fix bug

* fix bug

* fix bug

* fix bug

* fix bug

* fixbug

* pre-commit passed

* fix bug

* fixbug

* fix bug

* fix bug

* fix bug

* fix bug

* self review done

* fixbug

* fix bug

* fix bug

* fix bugs

* remove sub-token offset mapping

* fix name bug

* add some tests

* 1. support batch inference of text-generation,text2text-generation,token-classification,text-classification 2. add corresponding UTs

* add old logic back

* tmp save

* add tokenize by words logic back

* move outputs file back

* revert veco token-classification back

* fix typo

* Fix description

* Merge commit '4dd99b8f6e4e7aefe047c68a1bedd95d3ec596d6' into feat/refactor_config

* Merge branch 'master' into feat/refactor_config

# Conflicts:
#	modelscope/pipelines/builder.py
2022-11-30 23:52:17 +08:00
qianmu.ywh
bca6da3b56 update pipeline according to online demo requirements
根据在线demo前端的要求,多输出一个color图片用于展示
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10926624
2022-11-30 22:19:11 +08:00
yuze.zyz
fde8644883 Fix a bug that the logging file cannot save the correct lr, which is zero instead
This bug is a result of float rounding when saving key-value pairs to log files, which is reported by a user.
Now the solution is to remove the rounding operation of all values, instead of only the lr value, which I think may be too specific.

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10684029
2022-11-30 21:59:02 +08:00
jiangyu.xzy
9bfc77c178 support asr new models
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10919277

* support new asr paraformer model

* support asr conformer model
2022-11-30 17:08:35 +08:00
qianmu.ywh
cc27e3a25e update pipeline according to online demo requirements
按在线demo前端的要求,将输出改成单独一个numpy格式的图片
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10912907
2022-11-30 11:53:40 +08:00
jerry.lp
177d70829b add gpt-moe model for modelscope pipeline inference
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10836131
2022-11-29 20:54:32 +08:00
shuying.shu
9229a9b12b fix interpolate value error for vitadapter semantic segmentation
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10894248
2022-11-29 17:46:03 +08:00
shuying.shu
6baf602bc2 adjust input and output format for demo service
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10873454
2022-11-29 13:57:09 +08:00
xiangpeng.wxp
2536f9ec9b [to #42322933] add en-zh en-es es-en base translation models
* add en-zh en-es es-en base translation models
 * add en-zh en-es es-en base translation models
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10895782

    * 新增英中/英西/西英-base机器翻译模型

* 新增英中/英西/西英-base机器翻译模型
2022-11-29 13:44:06 +08:00
wenmeng.zwm
261cbb78ce Merge branch 'master-gitlab' into merge_master_github_1128 2022-11-28 22:57:44 +08:00
qianmu.ywh
fc6d0c64bc add image_depth_estimation: model, pipeline, test
接入图像深度估计模型,新增model、pipeline、test
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10857764
2022-11-28 18:00:48 +08:00
Yingda Chen
d5ee8aa66d move long-running test to level 2 2022-11-28 13:50:28 +08:00
wenmeng.zwm
b2dd4af2ae fix conflict 2022-11-28 13:34:54 +08:00
shichen.fsc
acb8d36699 [to #42322933] add extractive-summarization and topic-segmentation
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10856839
2022-11-25 19:29:02 +08:00
shiyi.zxh
7661470350 ofa增加asr任务
ofa增加asr任务infer
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10761019
2022-11-25 12:16:33 +08:00
lulu.lcq
ff171500bb [to #42322933] add dpm-solver for diffusion models
为diffusion模型加入dpm solver支持,相比ddim scheduler快2~6倍。
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10826722
2022-11-25 09:42:48 +08:00
pengzhendong
2605824dea [tests] add unittest 2022-11-24 16:42:01 +08:00
mulin.lyh
24b12698aa [to #46342279]fix: fix some time test_skin_retouching.py failed
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10851834

    * [to #46342279]fix: fix some time test_skin_retouching.py failed
2022-11-24 16:05:36 +08:00
mulin.lyh
70deb0190b [to #46289830]feat: hub sdk support retry and continue-download after error
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10814720
2022-11-24 15:01:24 +08:00
zhangzhicheng.zzc
7fc49e5fa0 support table recognition task
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10773667
2022-11-24 14:49:58 +08:00
wenmeng.zwm
7c0d7f872c [to 43878347] support batch inference in pipeline
It is recommented that each pipleine should implement `_batch`  to make a list of preprocessed data into a batched data dict.

Then  by paasing batch_size=n  we can use batch inference in pipline, for example
```python
img_captioning = pipeline(
            Tasks.image_captioning,
            model='damo/ofa_image-caption_coco_large_en')

results = img_captioning(
            [{
                'image': 'data/test/images/image_captioning.png'
            } for _ in range(6)],
            batch_size=2)
```

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10051193
2022-11-24 14:31:00 +08:00
wendi.hwd
ff55bd9436 support camouflaged-detection
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10834768
2022-11-24 10:24:05 +08:00
xianzhe.xxz
9da5091d4d add damoyolo-t & damoyolo-m
1. add damoyolo-t & damoyolo-m models
2. fix the configuration overlap error
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10816561
2022-11-23 09:27:16 +08:00
zhangzhicheng.zzc
5f719e542b [to #42322933] add nlp/addr/structure and update token classificaiton related method 2022-11-21 16:14:53 +08:00
wenmeng.zwm
584fa8f586 merge internal master 2022-11-18 14:21:05 +08:00
mulin.lyh
90a5efa1c2 [to #46106568]feat: parallel run ci case 2022-11-17 08:51:23 +08:00
wenmeng.zwm
9f2de967c5 merge master and fix conflict 2022-11-16 18:10:39 +08:00
james.wjg
541e460f8b add support for cv/language_guided_video_summarization
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10636269
2022-11-16 15:20:26 +08:00
wenmeng.zwm
e5980492a1 make mglm isolated test because mpu init problem
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10728515

    * make mglm isolated test because mpu init problem
2022-11-15 13:39:41 +08:00
xiangpeng.wxp
d6ea41fb70 [to #42322933] solve memory error for translation finetune
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10713843

    * [to #42322933] solve memory error for translation finetune
2022-11-14 20:31:29 +08:00
yingda.chen
4e4faa9a30 specifiy file encoding when open text for read
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10708723
2022-11-14 14:16:08 +08:00
huizheng.hz
2fe5203571 reduce image denoising test time
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10712244
2022-11-14 12:30:36 +08:00
shuying.shu
085acc64c8 fix bug and change unittest mode
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10680402
2022-11-10 13:09:56 +08:00
caorongyu.cry
e2a9695f93 [to #42322933] add synonym
主要做了如下修改:
1. 加入了同义词词典
2. 对SQL进行后处理,如果包含排序,则将空列转化成Primary列
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10670121
2022-11-08 22:20:03 +08:00
wenmeng.zwm
266851bbbb Merge branch 'master-gitlab' into master-github 2022-11-08 18:06:20 +08:00
hemu.zp
0f0fdcae6f [to #42322933] Fix bug for mplug evaluation
修复了 mplug evaluation 使用了错误的 metrics 的问题,将部分中文处理代码独立到 utils 中,为 mplug 添加 trainer
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10612875
2022-11-08 17:58:03 +08:00
zhangzhicheng.zzc
d3519bcbca [to #42322933]token preprocess bug fix
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10608664
2022-11-08 15:42:08 +08:00
翎航
fd4276ad1a add five finetune task & merge master 2022-11-08 10:57:22 +08:00
翎航
3534970709 add five finetune task & merge master 2022-11-08 10:39:59 +08:00
翎航
a02b2409d8 add five finetune task & merge master 2022-11-08 10:39:45 +08:00
翎航
04377cfd79 Merge branch 'master' into tmp
the new master
2022-11-08 10:36:27 +08:00
翎航
eb82ba9c6f add finetune & merge master 2022-11-07 20:30:18 +08:00
翎航
0418786cbe add five task finetune 2022-11-07 20:23:17 +08:00
yzhao
3f75fcdb79 fix bug 2022-11-02 20:02:18 +08:00
wenmeng.zwm
03725e30f7 merge master_internal to 1102 to github 2022-11-02 14:30:45 +08:00