[ci]: fix k3 comprehensive test nightly baseline retrieval#2753
[ci]: fix k3 comprehensive test nightly baseline retrieval#2753sammshen merged 1 commit intoLMCache:devfrom
Conversation
Signed-off-by: Samuel Shen <slshen@uchciago.edu>
Summary of ChangesHello, 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 addresses a critical issue in the K3 comprehensive test suite's nightly baseline retrieval mechanism. By refining the method for identifying and fetching benchmark baseline files, it ensures that the CI process accurately retrieves both date-stamped and legacy JSON baselines. This change enhances the reliability of nightly benchmark comparisons, preventing potential failures or incorrect results caused by the previous flawed globbing approach. Highlights
🧠 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
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request fixes an issue with retrieving nightly baseline files for comprehensive tests. The previous method using git ls-tree with a glob in the pathspec was not working correctly. The new implementation, which lists all files in the target directory and then uses grep with a regular expression to filter for the correct baseline files, is a more robust and correct approach. My review includes a suggestion to further improve maintainability by extracting a repeated path into a variable.
| local -a baseline_files=() | ||
| mapfile -t baseline_files < <( | ||
| git ls-tree --name-only origin/benchmarks-main -- \ | ||
| "benchmarks/long_doc_qa/${feat_type}-"*.json \ | ||
| "benchmarks/long_doc_qa/${feat_type}.json" \ | ||
| 2>/dev/null || true | ||
| benchmarks/long_doc_qa/ 2>/dev/null \ | ||
| | grep -E "^benchmarks/long_doc_qa/${feat_type}(-[0-9]{8})?\.json$" \ | ||
| || true | ||
| ) |
There was a problem hiding this comment.
To improve readability and maintainability, you could extract the repeated path benchmarks/long_doc_qa into a variable. This avoids repeating the string and makes it easier to update if the path ever changes.
| local -a baseline_files=() | |
| mapfile -t baseline_files < <( | |
| git ls-tree --name-only origin/benchmarks-main -- \ | |
| "benchmarks/long_doc_qa/${feat_type}-"*.json \ | |
| "benchmarks/long_doc_qa/${feat_type}.json" \ | |
| 2>/dev/null || true | |
| benchmarks/long_doc_qa/ 2>/dev/null \ | |
| | grep -E "^benchmarks/long_doc_qa/${feat_type}(-[0-9]{8})?\.json$" \ | |
| || true | |
| ) | |
| local baseline_dir="benchmarks/long_doc_qa" | |
| local -a baseline_files=() | |
| mapfile -t baseline_files < <( | |
| git ls-tree --name-only origin/benchmarks-main -- \ | |
| "${baseline_dir}/" 2>/dev/null \ | |
| | grep -E "^${baseline_dir}/${feat_type}(-[0-9]{8})?\.json$" \ | |
| || true | |
| ) |
No description provided.