Conversation
Evan8456
commented
Feb 18, 2026
- Removed sensitive_audio_tasks.json and replace it with audio_tasks_to_include.json to allow more control as to what tasks we wish to include during de-identification,
Summary of ChangesHello @Evan8456, 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 refactors the audio task configuration within the de-identification process. By shifting from an exclusion-based model to an inclusion-based model, the changes provide enhanced control and clarity over which specific audio tasks are selected for de-identification, improving the overall flexibility of the system. 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 refactors the de-identification process to use an inclusion-based configuration (audio_tasks_to_include.json) instead of an exclusion-based one (sensitive_audio_tasks.json). This is a good change for clarity and control.
My review focuses on ensuring this change is applied consistently across the codebase. I've found a few areas where old naming conventions and comments persist, which could cause confusion. I've also identified a bug in the new _grab_filepaths_list_to_include function that could lead to incorrect behavior and suggested a more efficient and correct implementation.
Overall, the changes are in the right direction. Addressing the feedback will improve the consistency and correctness of the implementation.
| n = len(paths) | ||
| inclusion = set(inclusion_list) | ||
| if len(inclusion) == 0: | ||
| return paths | ||
|
|
||
| new_paths = [] | ||
| for file in paths: | ||
| for incl in inclusion_list: | ||
| if normalize_task_label(incl) in normalize_task_label(file.stem): | ||
| new_paths.append(file) |
There was a problem hiding this comment.
This implementation has a couple of issues:
- It can add duplicate file paths to
new_pathsif a file stem matches multiple inclusion criteria. - It iterates over
inclusion_listinstead of theinclusionset that was created, which is less efficient if the list contains duplicates. - The normalization of inclusion strings and file stems is done repeatedly inside the loops, which is inefficient.
I suggest refactoring this part to be more efficient and to prevent adding duplicate paths.
| n = len(paths) | |
| inclusion = set(inclusion_list) | |
| if len(inclusion) == 0: | |
| return paths | |
| new_paths = [] | |
| for file in paths: | |
| for incl in inclusion_list: | |
| if normalize_task_label(incl) in normalize_task_label(file.stem): | |
| new_paths.append(file) | |
| n = len(paths) | |
| inclusion_set = {normalize_task_label(i) for i in inclusion_list} | |
| if not inclusion_set: | |
| return paths | |
| new_paths = [] | |
| for file in paths: | |
| normalized_stem = normalize_task_label(file.stem) | |
| if any(incl in normalized_stem for incl in inclusion_set): | |
| new_paths.append(file) |
There was a problem hiding this comment.
added an early break should achieve the same result.
There was a problem hiding this comment.
you don't do the efficient things it mentions but u do solve the possible error
wilke0818
left a comment
There was a problem hiding this comment.
looks mostly good. check gemini comments. some of them make sense, though I would tweak it's phrasing of error messages maybe. Overall I think I am still worried about how this logic incorporates with other logic in the code (namely selecting features to keep)