Skip to content

Fix[config]: replace store_true with BooleanOptionalAction for --l1-use-lazy#2761

Merged
maobaolong merged 2 commits intoLMCache:devfrom
liuyumoye:l1-use-lazy
Mar 13, 2026
Merged

Fix[config]: replace store_true with BooleanOptionalAction for --l1-use-lazy#2761
maobaolong merged 2 commits intoLMCache:devfrom
liuyumoye:l1-use-lazy

Conversation

@liuyumoye
Copy link
Copy Markdown
Contributor

fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy

Use argparse.BooleanOptionalAction instead of action='store_true' so that --no-l1-use-lazy can be passed on the command line to explicitly disable lazy loading for L1 memory.

…se-lazy

Use argparse.BooleanOptionalAction instead of action='store_true' so that
--no-l1-use-lazy can be passed on the command line to explicitly disable
lazy loading for L1 memory.

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>
@liuyumoye liuyumoye changed the title fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy Fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy Mar 12, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the command-line interface for LMCache by replacing the store_true action with argparse.BooleanOptionalAction for the --l1-use-lazy argument. This change allows users to explicitly disable lazy loading for L1 memory via the command line using the --no-l1-use-lazy option, providing greater flexibility in configuring the cache's behavior.

Highlights

  • Argparse Enhancement: Replaced store_true with argparse.BooleanOptionalAction for the --l1-use-lazy argument.
  • Command-Line Flexibility: Enabled the explicit disabling of lazy loading for L1 memory using the --no-l1-use-lazy command-line option.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • config.py
    • Replaced store_true with argparse.BooleanOptionalAction to allow disabling lazy loading via command line.
Activity
  • The pull request author, liuyumoye, has implemented a change to enhance command-line argument handling.
  • The change allows users to explicitly disable lazy loading for L1 memory.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@liuyumoye liuyumoye changed the title Fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy Fix[config]: replace store_true with BooleanOptionalAction for --l1-use-lazy Mar 12, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request correctly replaces action="store_true" with action=argparse.BooleanOptionalAction for the --l1-use-lazy argument. This enhancement allows users to explicitly disable lazy loading for L1 memory via the --no-l1-use-lazy command-line flag, improving the flexibility and usability of the configuration options. The change is well-aligned with argparse best practices for boolean flags.

Copy link
Copy Markdown
Contributor

@ApostaC ApostaC left a comment

Choose a reason for hiding this comment

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

Can we update the docs as well? There is a configuration page for mp mode that talks about the cli args: https://docs.lmcache.ai/mp/configuration.html

Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Copy link
Copy Markdown
Collaborator

@maobaolong maobaolong left a comment

Choose a reason for hiding this comment

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

LGTM. thanks for this improvement.

@maobaolong maobaolong enabled auto-merge (squash) March 13, 2026 03:50
@github-actions github-actions Bot added the full Run comprehensive tests on this PR label Mar 13, 2026
Copy link
Copy Markdown
Collaborator

@chunxiaozheng chunxiaozheng left a comment

Choose a reason for hiding this comment

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

LGTM!

@maobaolong maobaolong merged commit 899ae64 into LMCache:dev Mar 13, 2026
27 of 29 checks passed
hyunyul-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Mar 20, 2026
…se-lazy (LMCache#2761)

* fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy

Use argparse.BooleanOptionalAction instead of action='store_true' so that
--no-l1-use-lazy can be passed on the command line to explicitly disable
lazy loading for L1 memory.

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>

* Update doc

Signed-off-by: baoloongmao <baoloongmao@tencent.com>

---------

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Co-authored-by: liuyumoye <adeline_ly2023@outlook.com>
Co-authored-by: baoloongmao <baoloongmao@tencent.com>
realAaronWu pushed a commit to realAaronWu/LMCache that referenced this pull request Mar 20, 2026
…se-lazy (LMCache#2761)

* fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy

Use argparse.BooleanOptionalAction instead of action='store_true' so that
--no-l1-use-lazy can be passed on the command line to explicitly disable
lazy loading for L1 memory.

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>

* Update doc

Signed-off-by: baoloongmao <baoloongmao@tencent.com>

---------

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Co-authored-by: liuyumoye <adeline_ly2023@outlook.com>
Co-authored-by: baoloongmao <baoloongmao@tencent.com>
Signed-off-by: Aaron Wu <aaron.wu@dell.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
…se-lazy (LMCache#2761)

* fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy

Use argparse.BooleanOptionalAction instead of action='store_true' so that
--no-l1-use-lazy can be passed on the command line to explicitly disable
lazy loading for L1 memory.

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>

* Update doc

Signed-off-by: baoloongmao <baoloongmao@tencent.com>

---------

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Co-authored-by: liuyumoye <adeline_ly2023@outlook.com>
Co-authored-by: baoloongmao <baoloongmao@tencent.com>
jooho-XCENA pushed a commit to xcena-dev/LMCache that referenced this pull request Apr 2, 2026
…se-lazy (LMCache#2761)

* fix(config): replace store_true with BooleanOptionalAction for --l1-use-lazy

Use argparse.BooleanOptionalAction instead of action='store_true' so that
--no-l1-use-lazy can be passed on the command line to explicitly disable
lazy loading for L1 memory.

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>

* Update doc

Signed-off-by: baoloongmao <baoloongmao@tencent.com>

---------

Signed-off-by: liuyumoye <adeline_ly2023@outlook.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Co-authored-by: liuyumoye <adeline_ly2023@outlook.com>
Co-authored-by: baoloongmao <baoloongmao@tencent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants