Commit Graph

64 Commits

Author SHA1 Message Date
Yunlin Mao
dfb370b77d fix daily regression (#1545)
* update daily regression

* update test
2025-11-07 17:45:59 +08:00
Yunlin Mao
723599ac48 Update list datasets to OpenAPI (#1532)
* update list datasets

* Update modelscope/hub/constants.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update modelscope/hub/api.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update modelscope/hub/api.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update modelscope/hub/api.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* fix lint

* update workflow

* fix lint

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-11-05 17:04:29 +08:00
Gongsheng Li
3fd95b1bd7 Feat/support commit scheduler (#1480) 2025-10-21 16:41:55 +08:00
Gongsheng Li
4733d5374b add support for siblings field in repo_info (#1490) 2025-09-08 17:22:29 +08:00
Gongsheng Li
2fc6d8e822 Feat/support repo info (#1483) 2025-08-29 17:23:46 +08:00
tastelikefeet
a5039281d3 skip aigc test (#1476) 2025-08-23 11:12:35 +08:00
Xingjun.Wang
055496c597 Fix CI 2025-08-07 19:26:32 +08:00
Koko-ry
1d93f7e56d Feat: Add AIGC model creation support to create_model (#1431)
1.  Add create aigc model in `create_model` func
2. Add CLI for creating aigc model
2025-08-06 17:01:42 +08:00
Yunlin Mao
ff7551c494 fix large log in scan cache test (#1439) 2025-08-04 20:58:30 +08:00
tastelikefeet
f01864a2f9 weak file lock (#1417) 2025-07-17 18:38:24 +08:00
Jintao
29ea57dfbc [hub] Support ProgressCallback (#1380)
1. Add ProgressCallback for file download
2025-06-26 14:02:05 +08:00
Yunlin Mao
b034267345 [Feature] Add scan_cache_dir function (#1348)
* init cache manager

* add scan cache

* fix lint

* add scan cache unit test

* add download first for scan cache test
2025-05-28 09:59:03 +08:00
Xingjun.Wang
6adc8614c9 Add create_repo and upload UTs (#1282)
* add delete_repo, delete_dataset, exists_ok in create_repo

* add UT for create_repo
2025-04-07 10:24:26 +08:00
Yingda Chen
12d492e21f fix log level 2025-03-13 17:23:01 +08:00
xingjun.wxj
1036316afe update fallback for UTs 2025-03-12 22:39:00 +08:00
Yingda Chen
175b8d315e support dataset too 2025-03-11 18:22:29 +08:00
Yingda Chen
7d91e1b243 add tests 2025-03-11 17:05:08 +08:00
Yingda Chen
18fb4286d9 repo exist api support dataset 2025-03-04 15:18:37 +08:00
Yingda Chen
65075191f7 clean directory structure (#1201)
默认
模型:
~/.cache/modelscope/hub/models/{model_owner}/{model_name}
数据集:
~/.cache/modelscope/hub/datasets/{dataset_owner}/{dataset_name}

配置MODELSCOPE_CACHE环境变量:
模型:
$MODELSCOPE_CACHE/models/{model_owner}/{model_name}
数据集:
$MODELSCOPE_CACHE/datasets/{dataset_owner}/{dataset_name}

Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com>
2025-01-23 17:31:49 +08:00
tastelikefeet
b1404cdc2e Fix typo and unused imports (#1196)
* fix file exists of sub folder

* fix code doc

* add ci

* lint code

* fix unused imports and typo
2025-01-18 10:22:22 +08:00
tastelikefeet
b892164d11 Fix file exists of sub folder (#1192)
* fix file exists of sub folder

* fix code doc

* add ci

* lint code
2025-01-18 09:59:14 +08:00
Yingda Chen
83f1e20e80 add repo existence check hub-api (#1060)
* add repo existence check api

* update

---------

Co-authored-by: Yingda Chen <yingda.chen@alibaba-inc.com>
2024-11-02 08:04:40 +08:00
tastelikefeet
74d97ea7e0 Refactor zero sized file downloading (#991) 2024-09-14 15:12:28 +08:00
mulin.lyh
da9f3e58e3 enable download branch 2024-07-31 18:10:44 +08:00
mulin.lyh
775c29ef79 optimize code 2024-07-31 17:01:06 +08:00
liuyhwangyh
f7a32e48e3 add dataset download (#906)
* add dataset download

* fix cr issue

* fix cv matplotlib issue

* refactor code

* fix ut issue

* remove debug code

* remove unused import

* fix import issue

* sleep 65s before start docker avoid kill and run failed

---------

Co-authored-by: mulin.lyh <mulin.lyh@taobao.com>
2024-07-12 19:06:44 +08:00
zhyncs
5b8e1e971c fix ignore_file_pattern (#886)
* fix ignore_file_pattern

---------

Co-authored-by: root <root@kunkun>
2024-07-01 14:31:39 +08:00
mulin.lyh
4a22b05891 restore http_get_file interface 2024-05-28 15:09:05 +08:00
liuyhwangyh
17da5e2264 fix error report (#868)
Co-authored-by: mulin.lyh <mulin.lyh@taobao.com>
2024-05-28 14:38:19 +08:00
liuyhwangyh
5c470f8941 Download optimize (#862)
* fix #845

Supports resumption of downloads from breakpoints, optimized download progress bar, finer display granularity, better experience under low bandwidth, and added function of downloading specified directories.

* restore push to hub

* fix merge issue

* fix ut issue

---------

Co-authored-by: mulin.lyh <mulin.lyh@taobao.com>
2024-05-24 15:37:43 +08:00
mulin.lyh
8c80b0c3f5 support master branch version and add http request id
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/14072105
* support master branch version and add http request id

* modify no revision use master

* add specified revision="master"

* error message add request id
2023-09-20 19:29:30 +08:00
yuze.zyz
febc0365de Support FlexTrain and update the structure of trainer
1. Refactor training_args
2. Refactor hooks
3. Add train_id for push_to_hub
4. Support both output_dir/output_sub_dir for checkpoint_hooks
5. Support copy when hardlink fails when checkpointing
6. Support mixed dataset config file as a CLI argument
7. Add eval txt in output folder
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12384253
* support the ignorance of file pattern
2023-05-13 12:12:04 +08:00
mulin.lyh
8ea82e6f6d * add lfs append 2023-04-18 20:32:11 +08:00
yuze.zyz
2650d37094 Fix the log level and return value of push_to_hub
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12338218
2023-04-15 16:42:35 +08:00
yuze.zyz
4040320346 push to hub
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12235855
2023-04-10 18:17:52 +08:00
mulin.lyh
af641f7838 temporarily skip hub cases 2023-04-04 06:41:13 +08:00
wenmeng.zwm
285208912b add command line tool
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11661608

* add command line tool

* add unittest

* change absolute import to relative import for test case

* mv test_util to package
2023-02-20 21:21:54 +08:00
mulin.lyh
e54694690f [to #46993990]feat: run ci cases base on code diff to reduct ci test time 2023-02-06 08:00:19 +00:00
mulin.lyh
7039e93c99 skip temp failed case 2022-12-01 16:50:09 +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
mulin.lyh
3791ee7ad2 [to #45821936]fix: fix block user specify revision after release_datetime
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10572162
2022-10-29 13:44:47 +08:00
mulin.lyh
3b75623be4 [to #45773874]fix: get_model revision=None bug, and hub case occasionally delete test model failed
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10549680
2022-10-27 17:06:18 +08:00
jiaqi.sjq
7b84adc914 [to #42322933]Fix remove files in local model not take effect to remote repo after push_model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10533214
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10533214
2022-10-26 19:15:43 +08:00
mulin.lyh
384377b8f5 * [to #45486649]feat: modelscope model version use model repo tag, unsupport branch or commit it, client user-agent header unified 2022-10-26 13:55:51 +08:00
yuze.zyz
605cd7f44a [to #42322933] NLP 1030 Refactor
Features:
1. Refactor the directory structure of nlp models. All model files are placed into either the model folder or the task_model folder
2. Refactor all the comments to google style
3. Add detail comments to important tasks and nlp models, to list the description of the model, and its preprocessor&trainer
4. Model Exporting now supports a direct all to TorchModelExporter(no need to derive from it)
5. Refactor model save_pretrained method to support direct running(independent from trainer)
6. Remove the judgement of Model in the pipeline base class, to support outer register models running in our pipelines
7. Nlp trainer now has a NLPTrainingArguments class , user can pass arguments into the dataclass, and use it as a normal cfg_modify_fn, to simplify the operation of modify cfg.
8. Merge the BACKBONES and the MODELS, so user can get a backbone with the Model.from_pretrained call
9. Model.from_pretrained now support a task argument, so user can use a backbone and load it with a specific task class.
10. Support Preprocessor.from_pretrained method
11. Add standard return classes to important nlp tasks, so some of the pipelines and the models are independent now, the return values of the models will always be tensors, and the pipelines will take care of the conversion to numpy and the following stuffs.
12. Split the file of the nlp preprocessors, to make the dir structure more clear.

Bugs Fixing:
1. Fix a bug that lr_scheduler can be called earlier than the optimizer's step
2. Fix a bug that the direct call of Pipelines (not from pipeline(xxx)) throws error
3. Fix a bug that the trainer will not call the correct TaskDataset class
4. Fix a bug that the internal loading of dataset will throws error in the trainer class
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10490585
2022-10-25 12:26:25 +08:00
yingda.chen
3cd5f73da0 [to #42322933] refactor push_model
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10463992
2022-10-20 10:28:15 +08:00
jiaqi.sjq
87b4a52b3c Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10462681 2022-10-19 23:29:58 +08:00
jiaqi.sjq
2eb835aca4 [to #42322933]Add uuid to model which created by ut test
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10434107
        Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10434107

    * [Update] update finetune_result_upload

* [Update] rename finetune_result_upload to model_dir_upload

* Merge branch 'master' into feat/upload_ckpt

* Merge branch 'master' into feat/upload_ckpt

* [Fix] fix import error

* [Fix] fix import error

* Merge branch 'master' into feat/upload_ckpt

* [Update] changes name to upload_folder and using tempfile to save repo

* Merge branch 'master' into feat/upload_ckpt

* [Fix] fix commit

* Merge branch 'master' into feat/upload_ckpt

* [Fix] fix format

* Merge branch 'master' into feat/upload_ckpt

* [Fix] add uuid after model created from upload ut
2022-10-18 11:12:12 +08:00
jiaqi.sjq
8fa385e27c [to #42322933] Add upload in hub api
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10386689
2022-10-17 15:42:24 +08:00
wenmeng.zwm
6808e9a301 [to #44902099] add license for framework files
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10189613
2022-09-20 17:49:31 +08:00