Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(pr-agent): update configuration #7334

Merged
merged 4 commits into from
Jun 6, 2024
Merged

ci(pr-agent): update configuration #7334

merged 4 commits into from
Jun 6, 2024

Conversation

xmfcx
Copy link
Contributor

@xmfcx xmfcx commented Jun 6, 2024

User description

Description

Reference:

Tests performed

Not applicable.

Effects on system behavior

Interface changes

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.


PR Type

configuration changes, enhancement


Description

  • Added new configuration settings for the PR agent in .github/workflows/pr-agent.yaml.
  • Set pr_description.publish_labels to false.
  • Configured models to gpt-4o and gpt-4o for turbo.
  • Adjusted pr_code_suggestions settings, including max_context_tokens to 12000 and enabling commitable_code_suggestions.

Changes walkthrough 📝

Relevant files
Configuration changes
pr-agent.yaml
Update PR agent configuration settings                                     

.github/workflows/pr-agent.yaml

  • Added new configuration settings for PR agent.
  • Set pr_description.publish_labels to false.
  • Configured models to gpt-4o.
  • Adjusted pr_code_suggestions settings.
  • +6/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
    @xmfcx xmfcx added the tag:pr-agent Mark to enable PR-Agent for automated reviews. (used-by-ci) label Jun 6, 2024
    @xmfcx xmfcx requested review from yukkysaito and mitsudome-r June 6, 2024 16:52
    @xmfcx xmfcx self-assigned this Jun 6, 2024
    @github-actions github-actions bot added the type:ci Continuous Integration (CI) processes and testing. (auto-assigned) label Jun 6, 2024
    @xmfcx xmfcx added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jun 6, 2024
    @xmfcx
    Copy link
    Contributor Author

    xmfcx commented Jun 6, 2024

    /describe

    Copy link

    github-actions bot commented Jun 6, 2024

    PR Description updated to latest commit (adb19ae)

    Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
    @xmfcx
    Copy link
    Contributor Author

    xmfcx commented Jun 6, 2024

    /ask what model are you?

    Copy link

    github-actions bot commented Jun 6, 2024

    Ask

    what model are you?

    Answer:

    The new configuration in the PR specifies the models as follows:

    config.model: gpt-4o
    config.model_turbo: gpt-4o

    This indicates that the model being used is gpt-4o.

    Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
    @xmfcx
    Copy link
    Contributor Author

    xmfcx commented Jun 6, 2024

    /improve

    Copy link

    github-actions bot commented Jun 6, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Change the string "true" to a boolean true for the commitable_code_suggestions setting

    The pr_code_suggestions.commitable_code_suggestions setting is set to "true" as a string
    rather than a boolean. YAML supports boolean values directly, which can help avoid type
    mismatches during parsing. Consider changing the setting to a boolean.

    .github/workflows/pr-agent.yaml [38]

    -pr_code_suggestions.commitable_code_suggestions: "true"
    +pr_code_suggestions.commitable_code_suggestions: true
     
    Suggestion importance[1-10]: 9

    Why: Changing the string "true" to a boolean true is a best practice in YAML to avoid type mismatches and ensure consistency. This is a significant improvement for maintainability and correctness.

    9
    Use a boolean value for publish_labels to maintain consistency and avoid parsing issues

    The setting pr_description.publish_labels is set to "false" as a string. For consistency
    with other boolean settings in YAML, consider using a boolean value directly.

    .github/workflows/pr-agent.yaml [33]

    -pr_description.publish_labels: "false"
    +pr_description.publish_labels: false
     
    Suggestion importance[1-10]: 9

    Why: Using a boolean value for publish_labels enhances consistency and avoids potential parsing issues, making it a significant improvement for code quality and maintainability.

    9
    Possible issue
    Adjust the model configuration settings to use distinct values if they serve different purposes

    It seems that the configuration for config.model and config.model_turbo are both set to
    gpt-4o. If these settings are meant to specify different model configurations or
    operational modes, consider using distinct values for each to avoid redundancy and
    potential confusion.

    .github/workflows/pr-agent.yaml [34-35]

     config.model: gpt-4o
    -config.model_turbo: gpt-4o
    +config.model_turbo: gpt-4o-turbo  # Example of a distinct setting if applicable
     
    Suggestion importance[1-10]: 7

    Why: The suggestion addresses potential redundancy and confusion by recommending distinct values for config.model and config.model_turbo. However, it may not be crucial if the same model is intended for both settings.

    7
    Performance
    Evaluate and possibly reduce the max model tokens to optimize performance and cost

    The config.max_model_tokens is set to 64000 which might be too high depending on the use
    case. Consider evaluating the necessity of such a high limit as it can impact performance
    and costs.

    .github/workflows/pr-agent.yaml [36]

    -config.max_model_tokens: 64000
    +config.max_model_tokens: 32000  # Adjusted to a lower value based on performance evaluation
     
    Suggestion importance[1-10]: 6

    Why: While reducing the max model tokens could optimize performance and cost, the necessity of this change depends on specific use case requirements. It is a valid suggestion but may not be universally applicable.

    6

    Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
    @xmfcx xmfcx added run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) and removed configuration changes run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) labels Jun 6, 2024
    @xmfcx xmfcx merged commit 4c434d0 into main Jun 6, 2024
    39 of 43 checks passed
    @xmfcx xmfcx deleted the ci/pr-agent-update-config branch June 6, 2024 17:46
    @autowarefoundation autowarefoundation deleted a comment from github-actions bot Jun 6, 2024
    KhalilSelyan pushed a commit that referenced this pull request Jul 22, 2024
    Signed-off-by: M. Fatih Cırıt <mfc@leodrive.ai>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) tag:pr-agent Mark to enable PR-Agent for automated reviews. (used-by-ci) type:ci Continuous Integration (CI) processes and testing. (auto-assigned)
    Projects
    No open projects
    Status: Done
    Development

    Successfully merging this pull request may close these issues.

    1 participant