Skip to content

Add unit tests for LlamaDiskCache class#1

Draft
littlebai3618 wants to merge 1 commit intomainfrom
add-disk-cache-tests
Draft

Add unit tests for LlamaDiskCache class#1
littlebai3618 wants to merge 1 commit intomainfrom
add-disk-cache-tests

Conversation

@littlebai3618
Copy link
Owner

Description

This PR adds comprehensive unit tests for the LlamaDiskCache class to improve test coverage of the repository.

Changes

  • Added a new test file tests/test_llama_cache.py with tests for the LlamaDiskCache class
  • Tests cover initialization, cache size tracking, item storage and retrieval, prefix key finding, and capacity management

Testing

All tests pass successfully:

python -m pytest

Motivation

The LlamaDiskCache class provides important functionality for caching model states to disk, but lacked specific unit tests. These tests help ensure the functionality works as expected and increase the overall test coverage of the repository.

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.

2 participants