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

Pipeline generator plugins #33

Merged
merged 13 commits into from
Sep 25, 2024
Merged

Pipeline generator plugins #33

merged 13 commits into from
Sep 25, 2024

Conversation

khluu
Copy link
Collaborator

@khluu khluu commented Sep 19, 2024

Define Buildkite plugin class for Docker & Kubernetes, along with helper functions to generate these plugin configs.

p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
@khluu khluu requested review from simon-mo and aslonnie September 19, 2024 23:06
@khluu khluu changed the base branch from main to khluu/pipeline_gen_utils September 19, 2024 23:07
Signed-off-by: kevin <[email protected]>
@aslonnie
Copy link
Collaborator

could you rebase this on top of master?

f"{HF_HOME}:{HF_HOME}"
]

class KubernetesPodContainerConfig(BaseModel):
Copy link
Collaborator

Choose a reason for hiding this comment

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

we cancelled the plan to move back to k8s stack? why are we adding this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is for the A100 node on EKS (roblox aws)

@khluu khluu requested a review from aslonnie September 23, 2024 18:05
Signed-off-by: kevin <[email protected]>
Copy link
Collaborator

@aslonnie aslonnie left a comment

Choose a reason for hiding this comment

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

maybe it was lost last time; could you rebase this on top of master?

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Pytest
Copy link
Collaborator

Choose a reason for hiding this comment

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

this file is already on the main branch head?

containers: List[KubernetesPodContainerConfig]
priority_class_name: str = Field(default="ci", alias="priorityClassName")
node_selector: Dict[str, Any] = Field(
default={"nvidia.com/gpu.product": "NVIDIA-A100-SXM4-80GB"},
Copy link
Collaborator

Choose a reason for hiding this comment

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

where does this NVIDIA-A100-SXM4-80GB come from?

DOCKER_PLUGIN_NAME = "docker#v5.2.0"
KUBERNETES_PLUGIN_NAME = "kubernetes"

class DockerPluginConfig(BaseModel):
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you add some doc / comments, like for everything?

like maybe some link pointers to where the golden spec of these structs are defined?

class KubernetesPluginConfig(BaseModel):
pod_spec: KubernetesPodSpec = Field(alias="podSpec")

def get_kubernetes_plugin_config(docker_image_path: str, test_bash_command: List[str], num_gpus: int) -> Dict:
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: docker_image_path -> image or container_image ?

k8s does not always use docker. and the image does not have to be docker image.

@khluu khluu changed the base branch from khluu/pipeline_gen_utils to main September 24, 2024 00:28
p
Signed-off-by: kevin <[email protected]>
p
Signed-off-by: kevin <[email protected]>
@khluu khluu requested a review from aslonnie September 24, 2024 18:15
[
(
"test_image:latest",
["bash", "-c", "echo A", "pytest -v -s a.py"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

this command looks weird and not real.. "echo A" is the arg of -c, waht is the pytest after it? why does the command for a docker plugin look like this?

p
Signed-off-by: kevin <[email protected]>
@khluu khluu requested a review from aslonnie September 24, 2024 20:14
@khluu khluu merged commit 582d1cd into main Sep 25, 2024
1 check passed
@khluu khluu deleted the khluu/pipeline_gen_plugin branch October 9, 2024 20:42
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