LMCache / LMCache/lmcache-tests

[Refractor] copy-pasted codes in the "driver.py"

Open
#26 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.