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

WIP: add worker configuration for snakepit machines #563

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

bhearsum
Copy link
Collaborator

@bhearsum bhearsum commented May 6, 2024

This is not ready for review; using this PR as a place to kick off sanity checks for each machine type.

Analysis done in mozilla#538 (comment) shows that the problems are intermittent, and largely related to spot terminations. We're seeing the latter in the existing workers anyways, so unless we find more serious issues with generic-worker for CPU tasks, we may as well go ahead with this.
…modate upcoming runtime worker selection work
This patch adds a new `worker-classes` section of the training config which allows for selecting the "class" of worker to use (currently GCP spot or GCP standard) by kind, with support for a default. This allows us quite flexible configuration, eg: using spot instances for translation and standard ones for training. We will also be able to add one or more classes for Snakepit machines when we bring those online. The default value is `{"default": "gcp-spot"}` - which means that we'll use all spot machines by default. (We can change the default in `config.prod.yml` if desired.)

Most of this patch is quite a boring addition of the new `worker_selection` transform to the pipeline kinds. The most notable part otherwise is a fairly big rework of most things to do with workers in `config.yml`:
* The taskgraph-required `workers.aliases` is now a very simple, straightforward list of all available worker types.
* A new `local-worker-aliases` has been introduced. This maps the generic names like `b-largegpu` to concrete worker types `by-worker-class`. This removes the need for `-standard` variants for the generic names.
* This necessitated a new transform function that looks up the concrete worker type in each kind before we hand off to the `task` transforms. (Previously, that transform simply looked up things like `b-largegpu` in the `workers.aliases` block. If we had the ability to feed it `worker-class` information we could have kept all our mappings there - but I couldn't come up with a reasonable way to do this upstream.)
@bhearsum bhearsum force-pushed the snakepit branch 2 times, most recently from 290c009 to 5295363 Compare May 6, 2024 17:47
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.

None yet

1 participant