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

add modelscope and lora testcase #1506

Merged
merged 6 commits into from
Apr 30, 2024

Conversation

zhulinJulia24
Copy link
Collaborator

@zhulinJulia24 zhulinJulia24 commented Apr 26, 2024

  1. change torch into 2.2.1 version in daily test and benchmark test
  • triton>=2.2.0 has a bad performance. Just update torch version in function test. Keep torch 2.1 in benchmark.
  1. change log lever in benchmark, currently the log is too big(1G+)
  2. add more supported models in config.yaml
  3. fix testcase assert in autotest/interface/pipeline/test_pipeline_turbomind_func.py and autotest/interface/restful/test_restful_interface_func_pytorch.py, because of "" tokens in turbomind backend is filterd
  4. add modelscope testcase in cli chat, pipeline and restful with turbomind and pytorch backend
  5. add lora testcase in cli chat, pipeline and restful with pytorch backend
  6. simplify testcase name and move common case into common case and add some more testcase
  7. some optimization to make the error more clear and save more log info for issue reproduce

@zhulinJulia24
Copy link
Collaborator Author

zhulinJulia24 commented Apr 26, 2024

daily test: https://github.com/zhulinJulia24/lmdeploy/actions/runs/8867146159
three failures: one is fixed in #1447 brought by torch version update. The other issue is loggered in #1492
benchmark test: https://github.com/zhulinJulia24/lmdeploy/actions/runs/8864672497

@@ -32,12 +32,22 @@ on:
required: true
description: 'Dependency packages, you can also set a specific version'
type: string
default: 'packaging transformers_stream_generator transformers datasets matplotlib'
default: 'packaging transformers_stream_generator transformers datasets matplotlib jmespath'
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's jmespath used for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

what's jmespath used for?

by using torch >= 2.2.1 need this packages. just keep for future torch version update.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Odd. What is it? Which model brings it in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Odd. What is it? Which model brings it in?

I check test history . I add it because of this error. It seems only affect profile_generation script.

python3 benchmark/profile_generation.py /nvme/qa_test_models/internlm/internlm2-chat-20b --tp 2 --backend pytorch -c 128 -ct 128 2048 128 -pt 128 128 2048
profiling ... concurrency: 128, n_prompt_token: 128, n_completion_token: 128, test_round: 3, warmup_round: 1
Traceback (most recent call last):
  File "/home/zhulin1/lmdeployMainNew/benchmark/profile_generation.py", line 472, in <module>
    main()
  File "/home/zhulin1/lmdeployMainNew/benchmark/profile_generation.py", line 425, in main
    output = _process_map(profile_target, (args.model_path, ))
  File "/home/zhulin1/lmdeployMainNew/benchmark/profile_generation.py", line 372, in _process_map
    raise ret
ModuleNotFoundError: No module named 'jmespath'

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it not related to torch 2.2.1 version. It's related to latest main code?

@@ -119,7 +130,7 @@ jobs:
ref: ${{github.event.inputs.repo_ref || 'main'}}
- name: Copy repository - offline
if: ${{inputs.offline_mode}}
run: cp -r /nvme/qa_test_models/offline_pkg/lmdeploy/* .
run: cp -r /nvme/qa_test_models/offline_pkg/lmdeploy/. .
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the motivation of changing * to .?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cp -r /* does not copy .github folder. cp -r /. will copy .X file and folders too. It will fix this error
image

@@ -52,6 +53,7 @@ emoji_case:
- 赞
- 好
- '!'
- u1f44d
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's u1f44d

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this case is not stable, sometimes it will output unicode string,this is uincode string of 👍

- name: Install lmdeploy - dependency
run: |
python3 -m pip install ${{inputs.dependency_pkgs || 'packaging transformers_stream_generator transformers datasets matplotlib openai'}}
python3 -m pip install ${{inputs.dependency_pkgs || 'packaging transformers_stream_generator transformers datasets matplotlib openai attrdict timm modelscope jmespath'}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we put the extra dependencies into a requirements.txt and only change it once for all test pipelines? It will be more easy to manage. and only need to change once.

@@ -1,7 +1,7 @@
allure-pytest
coverage
pynvml
pytest==8.0.2
pytest
Copy link
Collaborator

Choose a reason for hiding this comment

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

why unlock the version of pytest? Is the version issue resolved?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why unlock the version of pytest? Is the version issue resolved?

this condition is added for bug on version 8.1 pytest-dev/pytest#12069
this bug is fixed, I want to remove the restriction,

Copy link
Collaborator

@RunningLeon RunningLeon left a comment

Choose a reason for hiding this comment

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

LGTM

@lvhan028 lvhan028 merged commit 7c4e75b into InternLM:main Apr 30, 2024
5 checks passed
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