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

Add min-available runners to scale-config #5713

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

zxiiro
Copy link
Collaborator

@zxiiro zxiiro commented Sep 25, 2024

This change allows the min-available runners to be configured more specifically by the runner type rather than as a single global setting.

Issue: pytorch/ci-infra#275

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 25, 2024
Copy link

vercel bot commented Sep 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
torchci ⬜️ Ignored (Inspect) Visit Preview Oct 16, 2024 2:29pm

@zxiiro zxiiro force-pushed the zxiiro/min-runners branch 2 times, most recently from 140d43b to 23f523f Compare October 8, 2024 11:54
Copy link
Contributor

@ZainRizvi ZainRizvi left a comment

Choose a reason for hiding this comment

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

Could you add a test that shows this new code being validated?

Comment on lines +395 to +403
const repo: Repo = (() => {
if (Config.Instance.enableOrganizationRunners) {
return {
owner: ec2runner.org !== undefined ? (ec2runner.org as string) : getRepo(ec2runner.repo as string).owner,
repo: Config.Instance.scaleConfigRepo,
};
}
return getRepo(ec2runner.repo as string);
})();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this have to be put inside a temporary lambda that's immediately invoked?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm a Typescript newbie so I'm not really sure myself, I used another function as a template that I copied from. I'll work on removing the temporary lambda function.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So the isEphemeralRunner() function above this uses the same code which I copied from. I'm inclined to keep it the same since it works. Maybe we can update both functions as an improvement in a separate pull request if we want to unravel the lambda.

@zxiiro
Copy link
Collaborator Author

zxiiro commented Oct 16, 2024

Could you add a test that shows this new code being validated?

Okay I'll work on adding a test for the new function.

This change allows the min-available runners to be configured more
specifically by the runner type rather than as a single global setting.

Issue: pytorch/ci-infra#275
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants