pytorch / pytorch/tutorials

Better sharding mechanism

Open
#1,899 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ci enhancement triaged
Dominant language
Python
Stars
9.3k
Forks
4.4k
Avg merge
1d 21h
Merged PRs (30d)
4

Description

Right now sharding is done in round-robin manner per folder, see https://github.com/pytorch/tutorials/blob/master/.jenkins/build.sh
Which creates a very unbalanced experience as some folders have 20+ tutorials, but many have as few as 3-4 tutorials, which is guaranteed to schedule more tutorials build in first shards and leave later shards with just 1 or 2 tutorials to build

This can be addressed by enumerating all tutorials and dividing them between shards evenly

cc @malfet @janeyx99

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with .jenkins/build.sh and inspect how tutorials are enumerated and assigned to shards. Update the sharding approach so all tutorials are divided evenly rather than round-robin by folder; done means later shards no longer receive substantially fewer tutorials during builds.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
build-system, ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.