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

feat: compute core ratio for local regressor #1743

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

sunya-ch
Copy link
Collaborator

This PR implement TODO addressed in #1732 by computing core ratio based on model machine spec and discovered spec (e.g., VM cores).

Signed-off-by: Sunyanan Choochotkaew [email protected]

Copy link
Contributor

github-actions bot commented Aug 28, 2024

🤖 SeineSailor

Here is a concise summary of the pull request changes:

Summary: This pull request refactors the kepler project to accurately compute the core ratio for the local regressor, addressing a TODO from PR #1732. The changes primarily affect the config and model packages.

Key Modifications:

  1. Core Ratio Calculation: The core ratio is now calculated based on the model machine spec and discovered spec (e.g., VM cores).
  2. Package Refactoring: The MachineSpec struct has been replaced with config.MachineSpec from the github.com/sustainable-computing-io/kepler/pkg/config package.
  3. Struct Updates: The ComponentModelWeights struct now includes config.MachineSpec, and the Regressor type has two new fields: RequestMachineSpec and DiscoveredMachineSpec.
  4. Method Updates: The setCoreRatio method calculates and sets the coreRatio, and the getWeightFromServer method now accepts *r.RequestMachineSpec instead of *r.MachineSpec.

Impact: These changes improve the accuracy of core ratio calculation, which is essential for the local regressor. The refactoring also enhances code organization and consistency by using the config package's MachineSpec.

Suggestions:

  • Consider adding unit tests to ensure the setCoreRatio method correctly calculates the core ratio.
  • Review the createPowerModelEstimator function's implementation to ensure it correctly handles the updated core ratio calculation.
  • Document the changes to the Regressor type and its new fields to facilitate understanding and maintenance.

Overall, this pull request improves the kepler project's accuracy and maintainability.

@sunya-ch sunya-ch force-pushed the model-server-patch-1 branch from 78706cb to d940cbc Compare August 28, 2024 07:46
@rootfs rootfs merged commit aa822ee into sustainable-computing-io:main Aug 28, 2024
20 checks passed
maryamtahhan pushed a commit to maryamtahhan/kepler that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants