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

[Bug] Accumulated bug fix on controller manager, mock app configuration, and gpu optimizer. #522

Merged
merged 6 commits into from
Dec 12, 2024

Conversation

zhangjyr
Copy link
Collaborator

Pull Request Description

This PR fixed:

  1. Major: The controller manager did not include "protocol" in the metrics URL when the type of metricsSource is "domain".
  2. Major: The mock app configuration was broken.
  3. Minor: When the endpoint didn't include a port and the port was specified in metricsSource, the port was not included in the metrics URL, which is non-intuitive.
  4. Minor: Improve fault tolerance in GPU optimizer code.

A new unit test is added to ensure the controller manager handles the URL of domain metricsSource correctly.

Related Issues

Resolves: #[Insert issue number(s)]

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to aibrix! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to aibrix's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

Jingyuan Zhang added 3 commits December 10, 2024 11:44
Add test case for make url created from metricSource as expected: endpoint should include port, if not and port is specified, port will be append to endpoint.
@zhangjyr zhangjyr added area/autoscaling priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. area/heterogeneous labels Dec 11, 2024
@zhangjyr zhangjyr added this to the v0.2.0 milestone Dec 11, 2024
@zhangjyr zhangjyr requested review from Jeffwan, kr11 and nwangfw December 11, 2024 23:25
@zhangjyr zhangjyr changed the title [BUG] Accumulated bug fix on controller manager, mock app configuration, and gpu optimizer. [Bug] Accumulated bug fix on controller manager, mock app configuration, and gpu optimizer. Dec 11, 2024
Copy link
Collaborator

@Jeffwan Jeffwan left a comment

Choose a reason for hiding this comment

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

overall looks good to me.

spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: simulator-llama2-7b-a40
metricsSources:
- endpoint: aibrix-gpu-optimizer.aibrix-system.svc.cluster.local:8080
- metricSourceType: domain
Copy link
Collaborator

Choose a reason for hiding this comment

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

great to see new api is adopted.

type RestMetricsFetcher struct{}
type RestMetricsFetcher struct {
// For unit test purpose only
test_url_setter func(string)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is acceptable at this moment, we could consider RestMetricsFetcher interface later to better support testing

@@ -101,7 +100,7 @@ async def send_request(
# "top_p": 1.0,
"max_tokens": output_len,
# "ignore_eos": True,
# "stream": stream,
# "stream": streaming
Copy link
Collaborator

Choose a reason for hiding this comment

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

nice catch.

@Jeffwan Jeffwan merged commit 6752780 into main Dec 12, 2024
13 checks passed
@Jeffwan Jeffwan deleted the jingyuan/gpu_optimizer branch December 12, 2024 12:38
gangmuk pushed a commit that referenced this pull request Jan 25, 2025
…on, and gpu optimizer. (#522)

* Bug fix

* Fix configuration for domain podautoscaler
Add test case for make url created from metricSource as expected: endpoint should include port, if not and port is specified, port will be append to endpoint.

* Lint fix

* Add license for new files.

* Lint fix on added unit test.

---------

Co-authored-by: Jingyuan Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/autoscaling area/heterogeneous priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants