Skip to content

test(webapp): cover decentralized browser training across browsers - #1239

Open
ale18V wants to merge 10 commits into
mainfrom
test/browser-browser-cypress-ci
Open

ale18V wants to merge 10 commits into
mainfrom
test/browser-browser-cypress-ci

Conversation

@ale18V

@ale18V ale18V commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

Adds end-to-end webapp coverage for decentralized browser-to-browser training, as requested in #1196 and the review of #1230. Four real browser participants (two Chrome and two Firefox) train the default MNIST task through the webapp against a live Disco server over WebRTC. The run exercises Chrome–Chrome, Firefox–Firefox, and Chrome–Firefox model exchange.

Technical plan

Keep the test with the other webapp training suites. Start the standard built Disco server and a Vite webapp, then run four Cypress browser processes on a shared Xvfb display in CI. Assert that all participants complete 20 epochs and 10 model-sharing rounds.

Deviations from plan

None. This replaces the Node participant prototype in #1232 with browser-to-browser collaboration.

Todo

None.

@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from 55697bc to e489b7f Compare October 2, 2026 09:51
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from e489b7f to 0e054da Compare October 2, 2026 12:33
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from 0e054da to e76d17c Compare October 3, 2026 11:17
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from e76d17c to a7b402f Compare October 3, 2026 11:20
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch 2 times, most recently from ee165f3 to f335779 Compare October 5, 2026 21:57
@ale18V
ale18V changed the base branch from test/decentralized-webapp-ci to main October 5, 2026 21:57
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from f335779 to f6cc2e0 Compare October 6, 2026 07:12
@ale18V ale18V changed the title test(webapp): probe Chrome–Firefox decentralized training test(webapp): cover decentralized browser training across browsers Oct 6, 2026
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch 2 times, most recently from 0112c7a to 6da8cc1 Compare October 10, 2026 13:59
@ale18V
ale18V marked this pull request as ready for review October 10, 2026 14:01
@ale18V
ale18V requested a review from JulienVig October 10, 2026 14:13
@ale18V

ale18V commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator Author

I've also refactored the support folder to have a dedicated support/training folder

@ale18V
ale18V added this pull request to stack #1257 October 11, 2026 10:39
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from be145af to bdc2a99 Compare October 12, 2026 12:25

@JulienVig JulienVig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the great work! I mostly have nitpicking comments but I'm requesting changes because the CI is currently flaky. I just merged #1259 which should fix the error. You can request the review again once you rebased and see that the CI passes consistently

Comment thread webapp/cypress/support/training/decentralized/browsers.ts Outdated
Comment thread webapp/cypress/support/training/decentralized/browsers.ts Outdated
Comment thread webapp/cypress/support/training/decentralized/browsers.ts
Comment thread webapp/cypress/support/training/decentralized/browsers.ts Outdated
Comment thread webapp/cypress/e2e/training/decentralized/mnist.cy.ts Outdated
Comment thread webapp/cypress/e2e/training/decentralized/mnist.cy.ts Outdated
Comment thread webapp/cypress/e2e/training/decentralized/mnist.cy.ts Outdated
Comment thread webapp/cypress/e2e/training/decentralized/mnist.cy.ts Outdated
Comment thread webapp/cypress/e2e/training/decentralized/mnist.cy.ts Outdated
Comment thread webapp/cypress/support/training/decentralized/browsers.ts
@ale18V
ale18V force-pushed the test/browser-browser-cypress-ci branch from 50a5eff to a84faef Compare October 15, 2026 09:32
@ale18V
ale18V requested a review from JulienVig October 15, 2026 09:33

@JulienVig JulienVig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

All good! Just curious about why you ended up switching a firefox for edge rather than a chrome

import { createInterface } from "node:readline";

const browsers = ["chrome", "edge", "firefox", "firefox"];
const browsers = ["chrome", "chrome", "edge", "firefox"];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You mentioned it would be a better idea to swap out a chrome for edge rather than a firefox. Did someting make you change your mind?
Is this linked to the commit mentioning a "geckodriver race condition"?

Comment thread docs/CONTRIBUTING.md
This runs both Titanic and LUS COVID with a mocked server. The command starts
and stops Vite itself; port 1351 must be available.
The local command runs both Titanic and LUS COVID with a mocked server.
The decentralized command runs MNIST across Chrome and Firefox participants with a real server; install Chrome and Firefox (plus `xvfb` and `xauth` on headless Linux).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The decentralized command runs MNIST across Chrome and Firefox participants with a real server; install Chrome and Firefox (plus `xvfb` and `xauth` on headless Linux).
The decentralized command runs MNIST across Chrome, Edge and Firefox participants with a real server; install Chrome, Edge and Firefox (plus `xvfb` and `xauth` on headless Linux).

stdio: "pipe",
env: {
...process.env,
DISCO_TRAINING_E2E: "1",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

DISCO_TRAINING_E2E is already set in process.env isn't it? Do you need to set it again here?

cy.contains("button", "next").click();

cy.contains("button", "group").click();
cy.task<string[]>("readdir", "../datasets/CIFAR10").then((files) =>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
cy.task<string[]>("readdir", "../datasets/CIFAR10").then((files) =>
// Train on dummy images from CIFAR10, this test doesn't care about actual performance
cy.task<string[]>("readdir", "../datasets/CIFAR10").then((files) =>

test-e2e-decentralized:
name: decentralized webapp (mnist)
runs-on: ubuntu-latest
timeout-minutes: 10

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
timeout-minutes: 10
timeout-minutes: 12

The current timeouts add up to ~8min + 4 browser startut, I think 10min is a bit tight and we want to leave enough time to upload the screenshots if it fails

This branch has not been deployed

No deployments
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