Skip to content

Conversation

@jimmysway
Copy link
Contributor

Part 2 of #144

@jimmysway jimmysway force-pushed the fix/144-consolidating-config branch from 39e759b to b1b589e Compare October 15, 2025 14:21
RATE_GPU_H100_SU = os.getenv("RATE_GPU_H100_SU", "6.04")

# Legacy rate (for backward compatibility)
GPU_A100_RATE = os.getenv("GPU_A100_RATE", "1.803")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is this constant used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

I couldn't find it. A text search across your PR doesn't show any reference to GPU_A100_RATE

Comment on lines +20 to +21
SU_NAMES = ["GPUV100", "GPUA100", "GPUA100SXM4", "GPUH100", "CPU"]
RESOURCE_NAMES = ["vCPUs", "RAM", "GPUs"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are not configurations for the script. I would suggest leave them where they were in get_su_definitions for now. As mentioned by @naved001, we could move this information to a file at some point in the future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, exactly. Let's not touch these now for now. The whole SU types and their names will require some more thought.

Comment on lines 106 to 118
parser.add_argument("--rate-cpu-su", type=Decimal, default=Decimal(RATE_CPU_SU))
parser.add_argument(
"--rate-gpu-v100-su", type=Decimal, default=Decimal(RATE_GPU_V100_SU)
)
parser.add_argument(
"--rate-gpu-a100sxm4-su", type=Decimal, default=Decimal(RATE_GPU_A100SXM4_SU)
)
parser.add_argument(
"--rate-gpu-a100-su", type=Decimal, default=Decimal(RATE_GPU_A100_SU)
)
parser.add_argument(
"--rate-gpu-h100-su", type=Decimal, default=Decimal(RATE_GPU_H100_SU)
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

If the point of this PR is to have configuration done through env vars, I would suggest removing these parser arguments since they are now redundant.

Comment on lines 27 to 31
RATE_CPU_SU = os.getenv("RATE_CPU_SU", "0.013")
RATE_GPU_V100_SU = os.getenv("RATE_GPU_V100_SU", "1.214")
RATE_GPU_A100SXM4_SU = os.getenv("RATE_GPU_A100SXM4_SU", "2.078")
RATE_GPU_A100_SU = os.getenv("RATE_GPU_A100_SU", "1.803")
RATE_GPU_H100_SU = os.getenv("RATE_GPU_H100_SU", "6.04")
Copy link
Collaborator

Choose a reason for hiding this comment

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

@naved001 Do we still want keep the old behavior of having the rates None if not provided?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, good point. If someone were to forget setting I'd rather the code fail than use some default values for rates.

@naved001
Copy link
Collaborator

@jimmysway have you had a chance to address the comments in this PR?

…and rewriting code references.

Removed CLI arguments for setting rates
@jimmysway jimmysway force-pushed the fix/144-consolidating-config branch from b1b589e to 2967310 Compare November 11, 2025 15:25
@jimmysway
Copy link
Contributor Author

jimmysway commented Nov 11, 2025

Sorry I had them sitting in my local branch. I just merged with upstream

@QuanMPhm
Copy link
Collaborator

@jimmysway There are merge conflicts in the PR

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.

3 participants