LMCache / LMCache/lmcache-tests
[Refractor] copy-pasted codes in the "driver.py"
@zhuohangu is already working on this.
Since Nov 13, 2024.
- Dominant language
- Python
- Stars
- 10
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
# Describe the problem
There are multiple copy-pasted codes in the "driver.py". We need to refactor it. Some example:
- `execute_one_request` and `execute_one_request_with_output`
- `execute_all` and `execute_all_with_output`
- `execute_openai_request` and `execute_openai_request_with_output`
- `run_experiment` and `run_multi_turn_experiment`
In these similar functions, the difference may only be one additional return value, so it is a good idea to delete the copy-pasted codes and just use one function in the above pairs.
# How to test
For the first functions in these pairs, you can use `test_lmcache_local_cpu` to test. For the second functions in these pairs, you can use `test_multi_turn` to test.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.