You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Code Consistency The use of [green] tags for formatting in process_report is inconsistent with the rest of the application's styling conventions. Consider aligning this with existing styles or ensure that all parts of the application support these tags.
User Prompt Clarity The updated prompt in baseline function for dataset information may still be unclear to users. Consider specifying what types of dataset information are acceptable or expected.
Add checks to ensure keys exist in the dictionary before accessing them
Consider checking if the keys exist in the suggestions dictionary before accessing them to avoid potential None values being formatted into the string, which could lead to misleading or incomplete information being displayed.
-[green]Dataset Summary:[/green] {suggestions.get('data_summary')}-[green]Suggestion Summary:[/green] {suggestions.get('suggestion')}-[green]Task:[/green] {suggestions.get('task')}-[green]Model:[/green] {suggestions.get('model_or_algorithm')}-[green]Training Strategy:[/green] {suggestions.get('training_method')}-[green]Evaluation Metric:[/green] {suggestions.get('evaluation_metric')}-[green]Training Device:[/green] {suggestions.get('device')}-[green]Serving Strategy:[/green] {suggestions.get('serving_method')}-[green]Reference:[/green] {suggestions.get('reference')}-[green]Dependency:[/green] {suggestions.get('frameworks')}+[green]Dataset Summary:[/green] {suggestions['data_summary'] if 'data_summary' in suggestions else 'N/A'}+[green]Suggestion Summary:[/green] {suggestions['suggestion'] if 'suggestion' in suggestions else 'N/A'}+[green]Task:[/green] {suggestions['task'] if 'task' in suggestions else 'N/A'}+[green]Model:[/green] {suggestions['model_or_algorithm'] if 'model_or_algorithm' in suggestions else 'N/A'}+[green]Training Strategy:[/green] {suggestions['training_method'] if 'training_method' in suggestions else 'N/A'}+[green]Evaluation Metric:[/green] {suggestions['evaluation_metric'] if 'evaluation_metric' in suggestions else 'N/A'}+[green]Training Device:[/green] {suggestions['device'] if 'device' in suggestions else 'N/A'}+[green]Serving Strategy:[/green] {suggestions['serving_method'] if 'serving_method' in suggestions else 'N/A'}+[green]Reference:[/green] {suggestions['reference'] if 'reference' in suggestions else 'N/A'}+[green]Dependency:[/green] {suggestions['frameworks'] if 'frameworks' in suggestions else 'N/A'}
Suggestion importance[1-10]: 9
Why: This suggestion improves the robustness of the code by preventing potential issues with missing keys in the dictionary, which could lead to misleading or incomplete information being displayed.
9
Maintainability
Refactor the code to use a loop for generating formatted strings
To enhance the readability and maintainability of the code, consider using a loop to generate the formatted strings for each key in the suggestions dictionary instead of manually writing each line.
Why: This suggestion enhances the readability and maintainability of the code by reducing repetition and making it easier to update the list of keys in the future.
HuaizhengZhang
changed the title
[WIP] refactor the displayed info, fix small UI issues
[MRG] refactor the displayed info, fix small UI issues
Jul 26, 2024
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before submitting this PR, please make sure you have:
the credit file.
PR Type
Enhancement
Description
process_report
function using[green]
tags for better readability.AdviseAgent.suggest
method to be more descriptive.ask_data
function using[green]
tags.baseline
function for clarity.baseline
function to include formatted user requirements.Changes walkthrough 📝
advisor.py
Refactor suggestion display and update status message
mle/agents/advisor.py
[green]
tags.AdviseAgent.suggest
method.baseline.py
Refactor dataset display and update prompts
mle/workflow/baseline.py
[green]
tags.requirements.